[ 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": "* Tato položka je povinná", 10 "alertTextCheckboxMultiple": "* Prosím vyberte jednu možnost", 11 "alertTextCheckboxe": "* Tato položka je povinná" 12 }, 13 "requiredInFunction": { 14 "func": function(field, rules, i, options){ 15 return (field.val() == "test") ? true : false; 16 }, 17 "alertText": "* Pole se musí rovnat test" 18 }, 19 "minSize": { 20 "regex": "none", 21 "alertText": "* Minimálně ", 22 "alertText2": " znaky" 23 }, 24 "maxSize": { 25 "regex": "none", 26 "alertText": "* Maximálně ", 27 "alertText2": " znaky" 28 }, 29 "groupRequired": { 30 "regex": "none", 31 "alertText": "* Musíte zadat jedno z nasledujících polí" 32 }, 33 "min": { 34 "regex": "none", 35 "alertText": "* Minimální hodnota je " 36 }, 37 "max": { 38 "regex": "none", 39 "alertText": "* Maximální hodnota je " 40 }, 41 "past": { 42 "regex": "none", 43 "alertText": "* Datum před " 44 }, 45 "future": { 46 "regex": "none", 47 "alertText": "* Datum po " 48 }, 49 "maxCheckbox": { 50 "regex": "none", 51 "alertText": "* Počet vybraných položek přesáhl limit" 52 }, 53 "minCheckbox": { 54 "regex": "none", 55 "alertText": "* Prosím vyberte ", 56 "alertText2": " volbu" 57 }, 58 "equals": { 59 "regex": "none", 60 "alertText": "* Pole se neshodují" 61 }, 62 "creditCard": { 63 "regex": "none", 64 "alertText": "* Neplatné číslo kreditní karty" 65 }, 66 "CZphone": { 67 // telefoní číslo 68 "regex": /^([\+][0-9]{1,3}[ \.\-])([0-9]{3}[\-][0-9]{3}[\-][0-9]{3})$/, 69 "alertText": "* Neplatné telefoní číslo, zadejte ve formátu +420 598-598-895" 70 }, 71 "phone": { 72 // credit: jquery.h5validate.js / orefalo 73 "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/, 74 "alertText": "* Neplatné telefoní číslo" 75 }, 76 "email": { 77 // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ 78 "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, 79 "alertText": "* Neplatná emailová adresa" 80 }, 81 "integer": { 82 "regex": /^[\-\+]?\d+$/, 83 "alertText": "* Zadejte pouze čísla" 84 }, 85 "number": { 86 // Number, including positive, negative, and floating decimal. credit: orefalo 87 "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, 88 "alertText": "* Neplatné číslo" 89 }, 90 "CZdate": { 91 // datum ve formátu jak se používá v čr 92 "regex": /^(0[1-9]|[12][0-9]|3[01])[. /.](0[1-9]|1[012])[. /.](19|20)\d{2}$/, 93 "alertText": "* Neplatné datum, datum musí být ve formátu den.měsíc.rok (dd.mm.rrrr)" 94 }, 95 "date": { 96 // Date in ISO format. Credit: bassistance 97 "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/, 98 "alertText": "* Neplatné datum, datum musí být ve formátu YYYY-MM-DD" 99 }, 100 "ipv4": { 101 "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]))$/, 102 "alertText": "* Neplatná IP adresa" 103 }, 104 //česká syntaxe pro rodné číslo 105 "rc": { 106 "regex": /^\d{2}((0[1-9]|1[012])|(5[1-9]|6[012]))(0[1-9]|[12][0-9]|3[01])\/([0-9]{2,4})$/, 107 "alertText": "* Neplatné rodné číslo, tvar musí být 895431/4567" 108 }, 109 //poštovní směrovací číslo 110 "psc": { 111 "regex": /^\d{3}[ \.\-]\d{2}$/, 112 "alertText": "* Neplatné poštovní směrovací číslo, tvar musí být 456 45" 113 }, 114 "url": { 115 "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, 116 "alertText": "* Neplatný odkaz" 117 }, 118 "onlyNumberSp": { 119 "regex": /^[0-9\ ]+$/, 120 "alertText": "* Pouze čísla" 121 }, 122 "onlyLetterSp": { 123 "regex": /^[a-zA-Z\ \']+$/, 124 "alertText": "* Pouze písmena" 125 }, 126 "onlyLetterNumber": { 127 "regex": /^[0-9a-zA-Z]+$/, 128 "alertText": "* Pouze písmena a číslice" 129 }, 130 // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings 131 "ajaxUserCall": { 132 "url": "ajaxValidateFieldUser", 133 // you may want to pass extra data on the ajax call 134 "extraData": "name=eric", 135 "alertText": "* Uživatelské jméno je již použito", 136 "alertTextLoad": "* Ověřování, prosím čekejte" 137 }, 138 "ajaxNameCall": { 139 // remote json service location 140 "url": "ajaxValidateFieldName", 141 // error 142 "alertText": "* Uživatelské jméno je již použito", 143 // if you provide an "alertTextOk", it will show as a green prompt when the field validates 144 "alertTextOk": "* Toto jméno je k dispozici", 145 // speaks by itself 146 "alertTextLoad": "* Ověřování, prosím čekejte" 147 }, 148 "validate2fields": { 149 "alertText": "* Prosím napište HELLO" 150 } 151 }; 152 153 } 154 }; 155 $.validationEngineLanguage.newLang(); 156 })(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 |