formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

Validating an array of field configuration objects #703

Open icruces opened 8 years ago

icruces commented 8 years ago

I am working in an application where the user can define a form by providing an array of field configuration objects.

I need to validate that input before saving it into the DB, something like what API-check does underneath. For instance, the next form definition is wrong because it is using "keys" instead of "key":

[ { "keys": my_key", "types": "input", "templateOptions": { "type": "string", "label": "Clip" } } ]

Ideally the application should provide a feedback about the error to the user.

Does angular-formly have something to do that or should I create my own validator?

Thanks.