is an open source component of Wrapp and is licensed under the MIT license.
There are no required external dependencies at all!
The validation constraints can be declared in JSON and shared between clients and the server. One thing that is a bit unorthodox is that most validators will consider undefined values (,) valid values.
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.
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.
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.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).If the message is not a function and not a string it is simply returned as is.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.
The project can be found on Git Hub where you can also find our issue tracker.