[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 (function($){ 2 $.fn.validationEngineLanguage = function(){ 3 }; 4 $.validationEngineLanguage = { 5 newLang: function(){ 6 $.validationEngineLanguage.allRules = { 7 "required": { // Add your regex rules here, you can take telephone as an example 8 "regex": "none", 9 "alertText": "* این فیلد ضروری است", 10 "alertTextCheckboxMultiple": "* لطفا یک گزینه را انتخاب کنید", 11 "alertTextCheckboxe": "* این چک باکس ضروری است", 12 "alertTextDateRange": "* هر دو فیلدهای بازهی تاریخی ضروری هستند" 13 }, 14 "requiredInFunction": { 15 "func": function(field, rules, i, options){ 16 return (field.val() == "test") ? true : false; 17 }, 18 "alertText": "* Field must equal test" 19 }, 20 "dateRange": { 21 "regex": "none", 22 "alertText": "* بازهی تاریخی ", 23 "alertText2": "نامعتبر" 24 }, 25 "dateTimeRange": { 26 "regex": "none", 27 "alertText": "* بازهی زمانی", 28 "alertText2": "نامعتبر" 29 }, 30 "minSize": { 31 "regex": "none", 32 "alertText": "* حداقل ", 33 "alertText2": " حرف ضروری است" 34 }, 35 "maxSize": { 36 "regex": "none", 37 "alertText": "* حداکثر ", 38 "alertText2": " حرف وارد کنید" 39 }, 40 "groupRequired": { 41 "regex": "none", 42 "alertText": "* شما باید یکی از فیلدهای زیر را پر کنید" 43 }, 44 "min": { 45 "regex": "none", 46 "alertText": "* کمترین مقدار معتبر ", 47 "alertText2": " است" 48 }, 49 "max": { 50 "regex": "none", 51 "alertText": "* بیشترین مقدار معتبر ", 52 "alertText2": "است" 53 }, 54 "past": { 55 "regex": "none", 56 "alertText": "* تاریخهای قبل از " 57 }, 58 "future": { 59 "regex": "none", 60 "alertText": "* تاریخهای بعد از " 61 }, 62 "maxCheckbox": { 63 "regex": "none", 64 "alertText": "* بیشترین گزینهی قابل انتخاب ", 65 "alertText2": " است" 66 }, 67 "minCheckbox": { 68 "regex": "none", 69 "alertText": "* لطفا ", 70 "alertText2": " مورد انتخاب کنید" 71 }, 72 "equals": { 73 "regex": "none", 74 "alertText": "* فیلد نامعتبر است" 75 }, 76 "creditCard": { 77 "regex": "none", 78 "alertText": "شماره کارت اعتباری اشتباه" 79 }, 80 "phone": { 81 // credit: jquery.h5validate.js / orefalo 82 "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/, 83 "alertText": "* شماره تلفن معتبر وارد کنید" 84 }, 85 "email": { 86 // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ 87 "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, 88 "alertText": "* نشانی الکترونیکی معتبر وارد کنید" 89 }, 90 "integer": { 91 "regex": /^[\-\+]?\d+$/, 92 "alertText": "* عدد معتبر وارد کنید" 93 }, 94 "number": { 95 // Number, including positive, negative, and floating decimal. credit: orefalo 96 "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, 97 "alertText": "* عدد اعشاری معتبر وارد کنید" 98 }, 99 "date": { 100 "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/, 101 "alertText": "* تاریخ باید به شکل سال/ماه/روز" 102 }, 103 "ipv4": { 104 "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]))$/, 105 "alertText": "* IP معتبر وارد کنید" 106 }, 107 "url": { 108 "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, 109 "alertText": "* نشانی معتبر وارد کنید" 110 }, 111 "onlyNumberSp": { 112 "regex": /^[0-9\ ]+$/, 113 "alertText": "* فقط اعداد" 114 }, 115 "onlyLetterSp": { 116 "regex": /^[a-zA-Z\ \']+$/, 117 "alertText": "* فقط حروف انگلیسی" 118 }, 119 "onlyLetterNumber": { 120 "regex": /^[0-9a-zA-Z]+$/, 121 "alertText": "* فقط اعداد و حروف انگلیسی وارد کنید" 122 }, 123 // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings 124 "ajaxUserCall": { 125 "url": "ajaxValidateFieldUser", 126 // you may want to pass extra data on the ajax call 127 "extraData": "name=eric", 128 "alertText": "* این نامکاربری تکراری است", 129 "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" 130 }, 131 "ajaxUserCallPhp": { 132 "url": "phpajax/ajaxValidateFieldUser.php", 133 // you may want to pass extra data on the ajax call 134 "extraData": "name=eric", 135 // if you provide an "alertTextOk", it will show as a green prompt when the field validates 136 "alertTextOk": "* این نام کاربری آزاد است", 137 "alertText": "* این نامکاربری تکراری است", 138 "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" 139 }, 140 "ajaxNameCall": { 141 // remote json service location 142 "url": "ajaxValidateFieldName", 143 // error 144 "alertText": "* این نام پیشتر ثبت شده است", 145 // if you provide an "alertTextOk", it will show as a green prompt when the field validates 146 "alertTextOk": "* این نام آزاد است", 147 // speaks by itself 148 "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" 149 }, 150 "ajaxNameCallPhp": { 151 // remote json service location 152 "url": "phpajax/ajaxValidateFieldName.php", 153 // error 154 "alertText": "* این نام تکراری است", 155 // speaks by itself 156 "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" 157 }, 158 "validate2fields": { 159 "alertText": "* لطفا مقدار HELLO را وارد کنید" 160 }, 161 //tls warning:homegrown not fielded 162 "dateFormat":{ 163 "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]))$/, 164 "alertText": "* تاریخ نامعتبر" 165 }, 166 //tls warning:homegrown not fielded 167 "dateTimeFormat": { 168 "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})$/, 169 "alertText": "* تاریخ نامعتبر است یا شکل معتبری ندارد", 170 "alertText2": "شکلهای مورد معتبر: ", 171 "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", 172 "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" 173 } 174 }; 175 176 } 177 }; 178 179 $.validationEngineLanguage.newLang(); 180 181 })(jQuery);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |