Modella Validators
A plugin that provides a bunch of validators for modella.
Example Usage
var Person = validation = ; Person;
Basic Validators
Required
Verifies that a field is present.
var User = User;
Confirms
Verifies that a field equals another field.
var User = User ;
Type
Checks that a field is of a given type
var User = User;
In addition to string support for primitives, you can also pass in a constructor.
var User = User;
Choices
Checks that a field is one of the specified choices
var User = User
Format Validators
Verify the value of a field against a regex pattern. modella-validators
comes with a few regex strings built in under the formatStrings
object.
Format
Validates the field against the given regular expression
var User = User;
Phone Number
Validates the field against a (North American) phone number format
var User = User;
Email Address
Validates the field against a email address format
var User = User;
URL
Validates the field against a URL format
var User = User;