-
Notifications
You must be signed in to change notification settings - Fork 10
Validation Methods
Checks to make sure the field's value is of an accepted type. Accepted Types are "yes", "on", true and 1.
How To Use: "my-fields-name-attribute": "accepted"
Checks to make sure the field's value only contains English alphabetical characters.
How To Use: "my-fields-name-attribute": "alpha"
Accepted Parameters: None
Checks to make sure the field's value only contains English alphabetical characters, underscores and hyphens.
How To Use: "my-fields-name-attribute": "alphaDash"
Accepted Parameters: None
Checks to make sure the field's value only contains English alphabetical characters, underscores, hyphens and numerical values.
How To Use: "my-fields-name-attribute": "alphaNum"
Accepted Parameters: None
Checks to make sure the field's value is of numerical type and it is between the two provided values; min and max.
How To Use: "my-fields-name-attribute": "between:12,30"
Accepted Parameters: Min, Max
Checks to make sure the field's value length is between the two provided values; minLength and maxLength.
How To Use: "my-fields-name-attribute": "betweenLength:12,30"
Accepted Parameters: Min Length, Max Length
Checks to make sure the field's value is one of the provided values.
How To Use: "my-fields-name-attribute": "contains:foo,bar,baz,..."
Accepted Parameters: Comma Separated List Of Values
Checks to make sure the field's value is different from another field's value; you supply the other field's name attribute.
How To Use: "my-fields-name-attribute": "different:another-fields-name-attribute"
Accepted Parameters: Another Field's Name Attribute
Checks to make sure the field's value is of numerical type and has the same length, character wise, as the supplied value.
How To Use: "my-fields-name-attribute": "digitsLength:10"
Accepted Parameters: Length
Checks to make sure the field's value is of numerical type and has a length, character wise, between the two supplied values; minLength and maxLength.
How To Use: "my-fields-name-attribute": "digitsLength:10,50"
Accepted Parameters: Min Length, Max Length
Checks to make sure the field's value is a valid email address.
How To Use: "my-fields-name-attribute": "email"
Accepted Parameters: None
Checks to make sure the field's value is a valid IPv4 address.
How To Use: "my-fields-name-attribute": "ipv4"
Accepted Parameters: None
Checks to make sure the field's value is of numerical type and it is less than or equal to the value supplied.
How To Use: "my-fields-name-attribute": "max:10"
Accepted Parameters: Max
Checks to make sure the field's value length is less than or equal to the provided value.
How To Use: "my-fields-name-attribute": "maxLength:10"
Accepted Parameters: Max Length
Checks to make sure the field's value is of numerical type and it is greater than or equal to the value supplied.
How To Use: "my-fields-name-attribute": "min:10"
Accepted Parameters: Min
Checks to make sure the field's value length is greater than or equal to the provided value.
How To Use: "my-fields-name-attribute": "minLength:10"
Accepted Parameters: Min Length
Checks to make sure the field's value is NOT one of the provided values.
How To Use: "my-fields-name-attribute": "notIn:foo,bar,baz,..."
Accepted Parameters: Comma Separated List Of Values
Checks to make sure the field's value is of numerical type.
How To Use: "my-fields-name-attribute": "number"
Accepted Parameters: None
Checks to make sure the field's value is not null, undefined or false.
How To Use: "my-fields-name-attribute": "required"
Accepted Parameters: None
Checks to make sure the field's value is the same as another field's value; you supply the other field's name attribute.
How To Use: "my-fields-name-attribute": "same:another-fields-name-attribute"
Accepted Parameters: Another Field's Name Attribute
Checks to make sure the field's value is a valid Uniform Resource Locator (URL).
How To Use: "my-fields-name-attribute": "url"
Accepted Parameters: None