This site contains the document for old version. Please upgrade to the latest version v1.0.0

Validators

The richest validators in the class

FormValidation comes with various built-in validators listed in the alphabetical order as following:

No. Name Description
1 base64 Validate a base64 encoded string
2 between Check if the input value is between (strictly or not) two given numbers
3 bic Validate a BIC (Business Identifier Codes)
4 callback Return the validity from a callback method
5 choice Check if the number of checked boxes are less or more than a given number
6 color Validate a color in different formats
7 creditCard Validate a credit card number
8 cusip Validate a CUSIP
9 cvv Validate a CVV number
10 date Validate date
11 different Return true if the input value is different with given field's value
12 digits Return true if the value contains only digits
13 ean Validate an EAN (International Article Number)
14 ein Validate an EIN (Employer Identification Number)
15 emailAddress Validate an email address
16 file Validate file
17 greaterThan Return true if the value is greater than or equals to given number
18 grid Validate a GRId (Global Release Identifier)
19 hex Validate a hexadecimal number
20 iban Validate an International Bank Account Number (IBAN)
21 id Validate identification number
22 identical Check if the value is the same as one of particular field
23 imei Validate an IMEI (International Mobile Station Equipment Identity)
24 imo Validate an IMO (International Maritime Organization)
25 integer Validate an integer number
26 ip Validate an IP address. Support both IPv4 and IPv6
27 isbn Validate an ISBN (International Standard Book Number). Support both ISBN 10 and ISBN 13
28 isin Validate an ISIN (International Securities Identification Number)
29 ismn Validate an ISMN (International Standard Music Number)
30 issn Validate an ISSN (International Standard Serial Number)
31 lessThan Return true if the value is less than or equals to given number
32 mac Validate a MAC address
33 meid Validate a MEID (mobile equipment identifier)
34 notEmpty Check if the value is empty
35 numeric Check if the value is numeric
36 phone Validate a phone number
37 promise Use jQuery's Deferred to validate field's value
38 regexp Check if the value matches given Javascript regular expression
39 remote Perform remote checking via Ajax request
40 rtn Validate a RTN (Routing transit number)
41 sedol Validate a SEDOL (Stock Exchange Daily Official List)
42 siren Validate a Siren number
43 siret Validate a Siret number
44 step Check if the value is valid step one
45 stringCase Check if a string is a lower or upper case one
46 stringLength Validate the length of a string
47 uri Validate an URL address
48 uuid Validate an UUID, support v3, v4, v5
49 vat Validate VAT number
50 vin Validate an US VIN (Vehicle Identification Number)
51 zipCode Validate a zip code