Email validating form
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.
The attributes must be a plain object or a form element, things like backbone models etc are not supported.
For the format of the constraints see the constraints section.
You can tell to use any A compatible promise implemention like this: There are already many validation libraries out there today but most of them are very tightly coupled to a language or framework.
The goal of is to provide a cross framework and cross language way of validating data.
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.
supports async validations through the returns a Promise that is resolved if the validation passes and is rejected if the validation failed, passing the errors as the first argument.