]>
Dogcows Code - chaz/chatty/blob - root/static/js/jquery.validationEngine-en.js
2a3085a344c2930c9821724b108126308443b018
2 $.fn
.validationEngineLanguage = function(){
4 $.validationEngineLanguage
= {
6 $.validationEngineLanguage
.allRules
= {
7 "required": { // Add your regex rules here, you can take telephone as an example
9 "alertText": "This field is required.",
10 "alertTextCheckboxMultiple": "Please select an option.",
11 "alertTextCheckboxe": "This checkbox is required.",
12 "alertTextDateRange": "Both date range fields are required."
16 "alertText": "Invalid ",
17 "alertText2": "Date Range"
21 "alertText": "Invalid ",
22 "alertText2": "Date Time Range"
26 "alertText": "Minimum ",
27 "alertText2": " characters allowed"
31 "alertText": "Maximum ",
32 "alertText2": " characters allowed"
36 "alertText": "You must fill one of the following fields."
40 "alertText": "Minimum value is "
44 "alertText": "Maximum value is "
48 "alertText": "Date prior to "
52 "alertText": "Date past "
56 "alertText": "Maximum ",
57 "alertText2": " options allowed"
61 "alertText": "Please select ",
62 "alertText2": " options"
66 "alertText": "Fields do not match."
69 // credit: jquery.h5validate.js / orefalo
70 "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x
|ext
|extension
)[ ]?[0-9]{1,4})?$/,
71 "alertText": "Invalid phone number."
74 // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
75 "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
76 "alertText": "Invalid email address."
79 "regex": /^[\-\+]?\d+$/,
80 "alertText": "Not a valid integer."
83 // Number, including positive, negative, and floating decimal. credit: orefalo
84 "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
85 "alertText": "Invalid floating decimal number."
88 "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
89 "alertText": "Invalid date, must be in YYYY-MM-DD format."
92 "regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
93 "alertText": "Invalid IP address."
96 "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
97 "alertText": "Invalid URL."
100 "regex": /^[0-9\ ]+$/,
101 "alertText": "Numbers only."
104 "regex": /^[a
-zA
-Z
\ \']+$/,
105 "alertText": "Letters only."
107 "onlyLetterNumber": {
108 "regex": /^[0-9a-zA-Z]+$/,
109 "alertText": "No special characters allowed."
111 // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
113 "url": "ajaxValidateFieldUser",
114 // you may want to pass extra data on the ajax call
115 "extraData": "name=eric",
116 "alertText": "This user is already taken.",
117 "alertTextLoad": "Validating, please wait..."
120 "url": "phpajax/ajaxValidateFieldUser.php",
121 // you may want to pass extra data on the ajax call
122 "extraData": "name=eric",
123 // if you provide an "alertTextOk", it will show as a green prompt when the field validates
124 "alertTextOk": "This username is available.",
125 "alertText": "This user is already taken.",
126 "alertTextLoad": "Validating, please wait..."
129 // remote json service location
130 "url": "ajaxValidateFieldName",
132 "alertText": "This name is already taken.",
133 // if you provide an "alertTextOk", it will show as a green prompt when the field validates
134 "alertTextOk": "This name is available.",
136 "alertTextLoad": "Validating, please wait..."
139 // remote json service location
140 "url": "phpajax/ajaxValidateFieldName.php",
142 "alertText": "This name is already taken.",
144 "alertTextLoad": "Validating, please wait..."
147 "alertText": "Please input HELLO."
149 //tls warning:homegrown not fielded
151 "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
152 "alertText": "Invalid Date."
154 //tls warning:homegrown not fielded
156 "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,
157 "alertText": "Invalid Date or Date Format.",
158 "alertText2": "Expected Format: ",
159 "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ",
160 "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM"
162 "register_validate": {
163 "url": "register_validate",
164 "alertTextLoad": "Validating, please wait..."
170 $.validationEngineLanguage
.newLang();
This page took 0.046931 seconds and 4 git commands to generate.