alphaNumeric(*); | Is number or string(contains only numbers or strings) |
between(number, start, end); | Number is start or greater but less than or equal to end, all params numeric |
blank(*); | Empty string |
boolean(*); | true, false, 0, 1 |
cc(*); | Luhn checksum approved value |
date(*); | Is a date obj or is a string that is easily converted to a date |
decimal(*); | int or float |
email(*); | Seems like a valid email address |
empty(*); | If an object, array or function contains no properties true. All primitives return true. |
equal(*, *); | Any 2 things are strictly equal. If 2 objects their internal properties will be checked. If the first parameter has an equals method that will be run instead |
extension(ob1, ob2); | If obj2's methods are all found in obj1 |
fileExtension(value, arr); | Checks if the extension of value is in arr. An obj can be provide, but must have indexOf defined. |
fileExtensionAudio(value); | Check against mp3, ogg, wav, aac |
fileExtensionImage(value); | Check against png, jpg, jpeg, gif, bmp, svg, gif |
inArray(value, arr); | If * is in the array |
int(*, bool (optional)); | Is an int. If the 2nd variable is true (false by default) a decimal is allowed |
ip(str); | str resembles an IPV4 or IPV6 address |
minLength(val, min); | val (str or arr) is greater than min |
maxLength(val, max); | val (str or arr) is shorter than max |
multiple(num, mult); | Number is multiple of another number |
number(*); | Is either an int or decimal |
ofType(obj, typeName); | If it is a named object, and the name matches the string |
phone(str, canHaveExtension?); | Is an american phone number. Any punctuations are allowed. |
postal(*); | Is a postal code or zip code |
required(*); | Is not null, undefined or an empty string |
ssn(*); | Is a social security number |
string(*); | Is the argument of type string |