If you want to use async validation you need to use a runtime that supports Promises.
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.
After all, the built-in validator only applies to applications "behind closed doors" (or firewalls, anyway).
If your HTML form accepts an email field, it is a good practice to validate the email before the form is submitted.
There is also a Travis project used for testing, a Coveralls project used to code coverage as well as the annotated source.
is an open source component of Wrapp and is licensed under the MIT license.
Just remember to not include the attribute name since it's automatically prepended to the error message.
The message can also be a function which will be called to retrieve the message, besides this it is treated like a normal message (the attribute name is prepended etc).
In case you are using Node.js, you can use the same regular expression function below to validate emails both on the clientside and the serverside.
It is unit tested with 100% code coverage and can be considered fit for production.
The project can be found on Git Hub where you can also find our issue tracker.
So for example adding a constraint of at least 6 characters will be like saying If the attribute is given it must be at least 6 characters.
This differs from example Ruby on Rails where validators instead have the option.