laminas-api-tools/api-tools-admin

add field with validator option got 422 error

weierophinney opened this issue · 2 comments

steps to reproduce:

  1. create a field, for example foo
  2. create a validator with option, for example: StringLength with options min = 5 max 50
  3. save
  4. add another field and validator, got error:
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: field in vm.rpc.fields, Duplicate key: string:<, Duplicate value: "<"
http://errors.angularjs.org/1.2.30/ngRepeat/dupes?p0=field%20in%20vm.rpc.fields&p1=string%3A%3C&p2=%22%3C%22
d/<@http://api.dev/apigility-ui/76d13e21.vendor.js:3:20892
se</<.link/<@http://api.dev/apigility-ui/76d13e21.vendor.js:6:29884
d@http://api.dev/apigility-ui/76d13e21.vendor.js:5:12916
Fb/this.$get</k.prototype.$digest@http://api.dev/apigility-ui/76d13e21.vendor.js:5:13614
Fb/this.$get</k.prototype.$apply@http://api.dev/apigility-ui/76d13e21.vendor.js:5:15138
i@http://api.dev/apigility-ui/76d13e21.vendor.js:4:25333
r@http://api.dev/apigility-ui/76d13e21.vendor.js:4:27751
_a/</w.onreadystatechange@http://api.dev/apigility-ui/76d13e21.vendor.js:4:28327

http://api.dev/apigility-ui/76d13e21.vendor.js
Line 5

4. remove option of foo, got error:

"NetworkError: 422 Unprocessable Entity - http://api.dev/apigility/api/module/MyApi/rpc/MyApi-V1-Rpc-Foo-Controller/input-filter"

Originally posted by @samsonasik at zfcampus/zf-apigility-admin#366

the issue is because I want to add Zend\I18n\Validator\IsInt, but no package found, works after added. But I think the error should be more verbose to user.


Originally posted by @samsonasik at zfcampus/zf-apigility-admin#366 (comment)

Oh, so to be sure, the issue concerns directly the error message.

Good thinking, please make a commit that would make sense to this issue and let us review it.

( I love verbose)

;)


Originally posted by @colinkelly at zfcampus/zf-apigility-admin#366 (comment)