json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

Make validator selection API so validation libraries can be wrapped #871

Open mattbrunetti opened 7 years ago

mattbrunetti commented 7 years ago

Enhancement

As a user/developer, when I use this I should be able to ...

@json-schema-form/angular-schema-form-lead What are the chances of switching to use ajv instead of tv4 to get these enhancements in a future major version?

Compared to tv4, it seems pretty active (see number of Issues, number of PRs, Graphs > Commits on the github page for ajv vs for tv4) and pretty popular (see Stats on the npm page for ajv vs for tv4). It also makes me feel warm and fuzzy that it's used by Webpack.

Anthropic commented 7 years ago

@mattbrunetti making validator selectable is definitely something I am looking at, it is something we need given the lack of support now for tv4. But I don't want to repeat the mistake of lock-in and select ajv, for example djv appears to be 25% faster, just not as up to date, but if it was supporting the latest draft it would be superior performance wise. So yes the plan is to make it possible to pick a validator, make a wrapper for it and plug it in. I just can't promise anything on timelines, although it is definitely something I want myself, so is a higher priority than many other things. :)

mattbrunetti commented 7 years ago

Even better! This is great news!