42 "email":
function(
value,options)
49 var rx = /^[^@]+@[^@]+\.[a-zA-Z.]{2,}$/;
54 return "Invalid Email Address.";
72 "phone":
function(
value,options)
78 var rx = /^([0-9\(\)\/\+ \-\+\.]*)$/;
83 return "Invalid Phone Number.";
125 "number":
function(
value,options)
128 return "Value cannot be parsed as a number.";
130 var v = parseFloat(
value);
132 if (
"min" in options)
134 if (v < parseFloat(options.min))
135 return "Value is below minimum of "+options.min;
138 if (
"max" in options)
140 if (v > parseFloat(options.max))
141 return "Value is above maximum of "+options.max;
174 "text":
function(
value,options)
191 "time":
function(
value,options)
197 var rx = /^\d\d:\d\d(:\d\d)?$/;
202 return "Invalid Time.";
220 "url":
function(
value,options)
230 "(?:(?:https?|ftp)://)" +
232 "(?:\\S+(?::\\S*)?@)?" +
236 "(?!10(?:\\.\\d{1,3}){3})" +
237 "(?!127(?:\\.\\d{1,3}){3})" +
238 "(?!169\\.254(?:\\.\\d{1,3}){2})" +
239 "(?!192\\.168(?:\\.\\d{1,3}){2})" +
240 "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})" +
246 "(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" +
247 "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" +
248 "(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" +
252 "([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|" +
253 "([0-9a-fA-F]{1,4}:){1,7}:|" +
254 "([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|" +
255 "([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|" +
256 "([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|" +
257 "([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|" +
258 "([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|" +
259 "[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|" +
260 ":((:[0-9a-fA-F]{1,4}){1,7}|:)|" +
261 "fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|" +
262 "::(ffff(:0{1,4}){0,1}:){0,1}" +
263 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}" +
264 "(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|" +
265 "([0-9a-fA-F]{1,4}:){1,4}:" +
266 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}" +
267 "(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" +
273 "(?:xn--[a-z0-9\\-]{1,59}|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?){0,62}[a-z\\u00a1-\\uffff0-9]{1,63}))" +
275 "(?:\\.(?:xn--[a-z0-9\\-]{1,59}|(?:[a-z\\u00a1-\\uffff0-9]+-?){0,62}[a-z\\u00a1-\\uffff0-9]{1,63}))*" +
277 "(?:\\.(?:xn--[a-z0-9\\-]{1,59}|(?:[a-z\\u00a1-\\uffff]{2,63})))" +
289 return "Invalid URL.";
317 if (
"allowEmpty" in options)
322 var e = options.allowEmpty ===
true || options.allowEmpty ===
"true";
326 if (!r)
return "Field is not allowed to be empty.";
basicOptionValidate(value, options)
setter value
a setter DOCME