Sometimes it's nice to be able validate field differently depending on the input itself.allows the validators object and validator options to be a function that should return the constraints/options: Validates the attributes object against the constraints.
If you want to modify which values are considered empty for example you can simply overwrite You can find some basic examples included in the project.
Besides accepting all options as the non async validation function it also accepts two additional options; clean Attributes which, unless before resolving the promise and wrap Errors which can be a function or constructor that will be called with the errors, options, attributes and constraints if an error occurs.
This allows you to define a better way of catching validation errors.
They are meant to give a feeling for how to use the library and should not be considered production ready code.
The native HTML form validate has been disabled in a demo purpose so that you may see how works in action.