a:11:{s:9:"#provides";s:20:"dojox.validate._base";s:9:"#resource";s:17:"validate/_base.js";s:9:"#requires";a:3:{i:0;a:3:{i:0;s:6:"common";i:1;s:11:"dojo.regexp";i:2;s:4:"dojo";}i:1;a:3:{i:0;s:6:"common";i:1;s:11:"dojo.number";i:2;s:4:"dojo";}i:2;a:2:{i:0;s:6:"common";i:1;s:21:"dojox.validate.regexp";}}s:30:"dojox.validate._isInRangeCache";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"dojox.validate.isText";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:8:"A string";}s:5:"flags";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"Object";s:7:"summary";s:321:"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.";}}s:6:"source";s:472:" flags = (typeof flags == "object") ? flags : {}; // test for text if(/^\s*$/.test(value)){ return false; } // Boolean // length tests if(typeof flags.length == "number" && flags.length != value.length){ return false; } // Boolean if(typeof flags.minlength == "number" && flags.minlength > value.length){ return false; } // Boolean if(typeof flags.maxlength == "number" && flags.maxlength < value.length){ return false; } // Boolean return true; // Boolean";s:7:"summary";s:95:"Checks if a string has non whitespace characters. Parameters allow you to constrain the length.";s:7:"returns";s:7:"Boolean";}s:24:"dojox.validate.isInRange";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:8:"A string";}s:5:"flags";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"Object";s:7:"summary";s:322:"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 ".".";}}s:6:"source";s:659:" value = dojo.number.parse(value, flags); if(isNaN(value)){ return false; // Boolean } // assign default values to missing paramters flags = (typeof flags == "object") ? flags : {}; var max = (typeof flags.max == "number") ? flags.max : Infinity, min = (typeof flags.min == "number") ? flags.min : -Infinity, dec = (typeof flags.decimal == "string") ? flags.decimal : ".", cache = dojox.validate._isInRangeCache, cacheIdx = value + "max" + max + "min" + min + "dec" + dec ; if(typeof cache[cacheIdx] != "undefined"){ return cache[cacheIdx]; } cache[cacheIdx] = !(value < min || value > max); return cache[cacheIdx]; // Boolean";s:7:"summary";s:70:"Validates whether a string denoting a number is between a max and min.";s:7:"returns";s:7:"Boolean";}s:29:"dojox.validate.isNumberFormat";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:8:"A string";}s:5:"flags";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"Object";s:7:"summary";s:118:"FIXME: make pseudo-object for this format: String flags.format A string or an Array of strings for multiple formats.";}}s:6:"source";s:116:" var re = new RegExp("^" + dojox.validate.regexp.numberFormat(flags) + "$", "i"); return re.test(value); // Boolean";s:7:"summary";s:41:"Validates any sort of number based format";s:11:"description";s:359:"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.";s:7:"returns";s:7:"Boolean";s:8:"examples";a:3:{i:0;s:234:" "(###) ###-####" -> (510) 542-9742 "(###) ###-#### x#???" -> (510) 542-9742 x153 "###-##-####" -> 506-82-1089 i.e. social security number "#####-####" -> 98225-1649 i.e. zip code";i:1;s:82:" // returns true: dojox.validate.isNumberFormat("123-45", { format:"###-##" });";i:2;s:110:"Check Multiple formats: dojox.validate.isNumberFormat("123-45", { format:["### ##","###-##","## ###"] });";}}s:26:"dojox.validate.isValidLuhn";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:406:" var sum = 0, parity, curDigit; if(!dojo.isString(value)){ value = String(value); } value = value.replace(/[- ]/g,''); //ignore dashes and whitespaces parity = value.length % 2; for(var i = 0; i < value.length; i++){ curDigit = parseInt(value.charAt(i)); if(i % 2 == parity){ curDigit *= 2; } if(curDigit > 9){ curDigit -= 9; } sum += curDigit; } return !(sum % 10); // Boolean";s:7:"summary";s:51:"Validate a String value against the Luhn algorithm.";s:11:"description";s:75:"Validate a String value against the Luhn algorithm to verify its integrity.";s:7:"returns";s:7:"Boolean";}s:20:"dojox.validate._base";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:14:"dojox.validate";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}