Object
Function
A string
length: Number, minlength: Number, maxlength: Number} flags.length If set, checks if there are exactly flags.length number of characters. flags.minlength If set, checks if there are at least flags.minlength number of characters. flags.maxlength If set, checks if there are at most flags.maxlength number of characters.
Checks if a string has non whitespace characters. Parameters allow you to constrain the length.
Boolean
Function
A string
max:Number, min:Number, decimal:String} flags.max A number, which the value must be less than or equal to for the validation to be true. flags.min A number, which the value must be greater than or equal to for the validation to be true. flags.decimal The character used for the decimal point. Default is ".".
Validates whether a string denoting a number is between a max and min.
Boolean
Function
A string
FIXME: make pseudo-object for this format: String flags.format A string or an Array of strings for multiple formats.
Validates any sort of number based format
Validates any sort of number based format. Use it for phone numbers, social security numbers, zip-codes, etc. The value can be validated against one format or one of multiple formats. Format Definition # Stands for a digit, 0-9. ? Stands for an optional digit, 0-9 or nothing. All other characters must appear literally in the expression.
Boolean
"(###) ###-####" -> (510) 542-9742 "(###) ###-#### x#???" -> (510) 542-9742 x153 "###-##-####" -> 506-82-1089 i.e. social security number "#####-####" -> 98225-1649 i.e. zip code
// returns true: dojox.validate.isNumberFormat("123-45", { format:"###-##" });
Check Multiple formats: dojox.validate.isNumberFormat("123-45", { format:["### ##","###-##","## ###"] });
Function
Validate a String value against the Luhn algorithm.
Validate a String value against the Luhn algorithm to verify its integrity.
Boolean
Object
Object
Object