From d8f322ebb84313f6be9cb9f8f1c1853ad8cc3424 Mon Sep 17 00:00:00 2001 From: Razvan Moraru Date: Wed, 11 Mar 2015 08:14:59 +0100 Subject: [PATCH 1/2] Removed tabs and proper formating --- js/languages/jquery.validationEngine-ca.js | 41 ++- js/languages/jquery.validationEngine-cz.js | 19 +- js/languages/jquery.validationEngine-da.js | 21 +- js/languages/jquery.validationEngine-de.js | 38 +-- js/languages/jquery.validationEngine-el.js | 63 ++-- js/languages/jquery.validationEngine-en.js | 91 +++-- js/languages/jquery.validationEngine-es.js | 41 ++- js/languages/jquery.validationEngine-et.js | 31 +- js/languages/jquery.validationEngine-fa.js | 53 ++- js/languages/jquery.validationEngine-fi.js | 17 +- js/languages/jquery.validationEngine-fr.js | 25 +- js/languages/jquery.validationEngine-he.js | 53 ++- js/languages/jquery.validationEngine-hr.js | 43 ++- js/languages/jquery.validationEngine-hu.js | 51 ++- js/languages/jquery.validationEngine-id.js | 35 +- js/languages/jquery.validationEngine-it.js | 31 +- js/languages/jquery.validationEngine-ja.js | 25 +- js/languages/jquery.validationEngine-lt.js | 320 +++++++++--------- js/languages/jquery.validationEngine-nl.js | 251 +++++++------- js/languages/jquery.validationEngine-no.js | 83 +++-- js/languages/jquery.validationEngine-pl.js | 59 ++-- js/languages/jquery.validationEngine-pt.js | 107 +++--- js/languages/jquery.validationEngine-pt_BR.js | 42 ++- js/languages/jquery.validationEngine-ro.js | 29 +- js/languages/jquery.validationEngine-ru.js | 20 +- .../jquery.validationEngine-sr_Cyrl.js | 91 +++-- .../jquery.validationEngine-sr_Latn.js | 91 +++-- js/languages/jquery.validationEngine-sv.js | 37 +- js/languages/jquery.validationEngine-tr.js | 37 +- js/languages/jquery.validationEngine-vi.js | 51 ++- js/languages/jquery.validationEngine-zh_CN.js | 49 ++- js/languages/jquery.validationEngine-zh_TW.js | 49 ++- 32 files changed, 981 insertions(+), 1013 deletions(-) diff --git a/js/languages/jquery.validationEngine-ca.js b/js/languages/jquery.validationEngine-ca.js index 1f9fe83..e2d7748 100644 --- a/js/languages/jquery.validationEngine-ca.js +++ b/js/languages/jquery.validationEngine-ca.js @@ -1,9 +1,7 @@ - -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +9,8 @@ "alertTextCheckboxMultiple": "* Si us plau seleccioni una opció", "alertTextCheckboxe": "* Aquest checkbox és obligatori" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* El contingut del camp ha de ser igual a test" @@ -22,7 +20,7 @@ "alertText": "* Mínimo de ", "alertText2": " caràcters autoritzats" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Deu omplir almenys un dels següents camps" }, @@ -31,7 +29,7 @@ "alertText": "* Màxim de ", "alertText2": " caràcters autoritzats" }, - "min": { + "min": { "regex": "none", "alertText": "* El valor mínim és " }, @@ -39,14 +37,14 @@ "regex": "none", "alertText": "* El valor màxim és " }, - "past": { + "past": { "regex": "none", "alertText": "* Data anterior a " }, "future": { "regex": "none", "alertText": "* Data posterior a " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* S'ha excedit número d'opcions permeses" @@ -88,7 +86,7 @@ "alertText": "* Data invàlida, si us play uilitzi el format DD/MM/AAAA" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Adreça IP invàlida" }, "url": { @@ -99,11 +97,11 @@ "regex": /^[0-9\ ]+$/, "alertText": "* Només números" }, - "onlyLetterSp": { + "onlyLetterSp": { "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Només lletres" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Només lletres" }, @@ -111,31 +109,30 @@ "regex": /^[0-9a-zA-Z]+$/, "alertText": "* No es permeten caràcters especials" }, - // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings + // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings "ajaxUserCall": { "url": "ajaxValidateFieldUser", - // you may want to pass extra data on the ajax call + // you may want to pass extra data on the ajax call "extraData": "name=eric", "alertTextLoad": "* Carregant, esperi si us plau", "alertText": "* Aquest nom d'usuari ja es troba en ús" }, "ajaxNameCall": { - // remote json service location + // remote json service location "url": "ajaxValidateFieldName", - // error + // error "alertText": "* Aquest nom d'usuari ja es troba en ús", - // if you provide an "alertTextOk", it will show as a green prompt when the field validates + // if you provide an "alertTextOk", it will show as a green prompt when the field validates "alertTextOk": "* Aquest nom est à disponible", - // speaks by itself + // speaks by itself "alertTextLoad": "* Carregant, esperi si us plau" }, "validate2fields": { "alertText": "* Si us plau, introduir HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); })(jQuery); - diff --git a/js/languages/jquery.validationEngine-cz.js b/js/languages/jquery.validationEngine-cz.js index 9a21638..062ae95 100644 --- a/js/languages/jquery.validationEngine-cz.js +++ b/js/languages/jquery.validationEngine-cz.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Prosím vyberte jednu možnost", "alertTextCheckboxe": "* Tato položka je povinná" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Pole se musí rovnat test" @@ -26,7 +25,7 @@ "alertText": "* Maximálně ", "alertText2": " znaky" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Musíte zadat jedno z nasledujících polí" }, @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Datum po " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Počet vybraných položek přesáhl limit" @@ -123,7 +122,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Pouze písmena" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Pouze písmena" }, @@ -153,7 +152,7 @@ "alertText": "* Prosím napište HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-da.js b/js/languages/jquery.validationEngine-da.js index 52d3075..c87d569 100644 --- a/js/languages/jquery.validationEngine-da.js +++ b/js/languages/jquery.validationEngine-da.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Vælg venligst en af mulighederne", "alertTextCheckboxe": "* Dette felt er påkrævet" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Indholdet af feltet skal være lig med test" @@ -26,7 +25,7 @@ "alertText": "* Maksimum ", "alertText2": " tegn tilladt" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Du skal udfylde mindst et af følgende felter" }, @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Datoen skal være efter " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Antallet af tilladte valg er overskredet" @@ -87,7 +86,7 @@ "alertText": "* Ugyldig dato, skal være i formatet ÅÅÅÅ-MM-DD" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Ugyldig IP adresse" }, "url": { @@ -102,7 +101,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Kun bogstaver" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Kun bogstaver" }, @@ -132,7 +131,7 @@ "alertText": "* Indsæt venligst HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-de.js b/js/languages/jquery.validationEngine-de.js index ebb4861..14371c8 100644 --- a/js/languages/jquery.validationEngine-de.js +++ b/js/languages/jquery.validationEngine-de.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Bitte wählen Sie eine Option", "alertTextCheckboxe": "* Dieses Feld ist ein Pflichtfeld" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -26,7 +25,7 @@ "alertText": "* Maximal ", "alertText2": " Zeichen erlaubt" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Sie müssen mindestens eines dieser Felder ausfüllen" }, @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Datum nach " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maximale Anzahl Markierungen überschritten" @@ -88,7 +87,7 @@ "alertText": "* Ungültiges Datumsformat, erwartet wird das Format JJJJ-MM-TT" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Ungültige IP-Adresse" }, "url": { @@ -96,17 +95,17 @@ "alertText": "* Ungültige URL" }, "onlyLetterSp": { - "regex": /^[a-zA-ZäüöÄÜÖßs\ \\\']+$/, - "alertText": "* Nur Buchstaben erlaubt" + "regex": /^[a-zA-ZäüöÄÜÖßs\ \\\']+$/, + "alertText": "* Nur Buchstaben erlaubt" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-zß\u00C0-\u017F\ ]+$/i, - "alertText": "* Nur Buchstaben erlaubt" + "alertText": "* Nur Buchstaben erlaubt" + }, + "onlyLetterNumber": { + "regex": /^[0-9a-zA-ZäüöÄÜÖßs-]+$/, + "alertText": "* Keine Sonderzeichen erlaubt" }, - "onlyLetterNumber": { - "regex": /^[0-9a-zA-ZäüöÄÜÖßs-]+$/, - "alertText": "* Keine Sonderzeichen erlaubt" - }, // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings "ajaxUserCall": { "url": "ajaxValidateFieldUser", @@ -129,11 +128,8 @@ "alertText": "* Bitte HELLO eingeben" } }; - + } }; $.validationEngineLanguage.newLang(); })(jQuery); - - - diff --git a/js/languages/jquery.validationEngine-el.js b/js/languages/jquery.validationEngine-el.js index 3eb21fe..438d59c 100644 --- a/js/languages/jquery.validationEngine-el.js +++ b/js/languages/jquery.validationEngine-el.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Υποχρεωτικό πεδίο", "alertTextDateRange": "* Και τα δύο πεδία ημ/νίας είναι υποχρεωτικά" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Το πεδίο πρέπει να έχει την τιμή test" @@ -37,7 +36,7 @@ "alertText": "* Μέγιστο μήκος ", "alertText2": " χαρακτήρες" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Πρέπει να επιλέξετε τουλάχιστον μια τιμή" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Η ημ/νια πρέπει να είναι μεγαλύτερη από " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Μέγιστος αριθμός επιλογών ", @@ -94,22 +93,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([\.][0-9]{3})*)|([0-9]+))?([,]([0-9]+))?$/, "alertText": "* Μη έγκυρος δεκαδικός" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { + "date": { + // Check if date is valid by leap year + "func": function(field) { var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Μη έγκυρη μορφή ημ/νίας (YYYY-MM-DD)" + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Μη έγκυρη μορφή ημ/νίας (YYYY-MM-DD)" }, "ipv4": { "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]))$/, @@ -139,7 +138,7 @@ "alertText": "* This user is already taken", "alertTextLoad": "* Validating, please wait" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -158,35 +157,35 @@ // speaks by itself "alertTextLoad": "* Validating, please wait" }, - "ajaxNameCallPhp": { + "ajaxNameCallPhp": { // remote json service location "url": "phpajax/ajaxValidateFieldName.php", // error "alertText": "* This name is already taken", // speaks by itself "alertTextLoad": "* Validating, please wait" - }, + }, "validate2fields": { "alertText": "* Please input HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "regex": /^(((0[1-9]|[12][0-9]|3[01])\/(0[13578]|10|12)\/(\d{4}))|(([0][1-9]|[12][0-9]|30)\/(0[469]|11)\/(\d{4}))|((0[1-9]|1[0-9]|2[0-8])\/(02)\/(\d{4}))|((29)\/(02)\/([02468][048]00))|((29)\/(02)\/([13579][26]00))|((29)\/(02)\/([0-9][0-9][0][48]))|((29)\/(02)\/([0-9][0-9][2468][048]))|((29)\/(02)\/([0-9][0-9][13579][26])))$/, "alertText": "* Μη έγκυρη ημ/νία" }, //tls warning:homegrown not fielded - "dateTimeFormat": { + "dateTimeFormat": { "regex": /^(((0[1-9]|[12][0-9]|3[01])\/(0[13578]|10|12)\/(\d{4}))|(([0][1-9]|[12][0-9]|30)\/(0[469]|11)\/(\d{4}))|((0[1-9]|1[0-9]|2[0-8])\/(02)\/(\d{4}))|((29)\/(02)\/([02468][048]00))|((29)\/(02)\/([13579][26]00))|((29)\/(02)\/([0-9][0-9][0][48]))|((29)\/(02)\/([0-9][0-9][2468][048]))|((29)\/(02)\/([0-9][0-9][13579][26])))\s+((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])))$/, "alertText": "* Μη έγκυρη ημ/νία ή/και ώρα", "alertText2": "Expected Format: ", "alertText3": "dd/mm/yyyy hh:mm:ss AM|PM or ", "alertText4": "dd/mm/yyyy HH:mm:ss " - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-en.js b/js/languages/jquery.validationEngine-en.js index ce08433..e04d952 100644 --- a/js/languages/jquery.validationEngine-en.js +++ b/js/languages/jquery.validationEngine-en.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* This checkbox is required", "alertTextDateRange": "* Both date range fields are required" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* Maximum ", "alertText2": " characters allowed" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* You must fill one of the following fields", "alertTextCheckboxMultiple": "* Please select an option", @@ -58,7 +57,7 @@ "future": { "regex": "none", "alertText": "* Date past " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maximum ", @@ -88,12 +87,12 @@ "alertText": "* Invalid email address" }, "fullname": { - "regex":/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, - "alertText":"* Must be first and last name" + "regex": /^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, + "alertText": "* Must be first and last name" }, "zip": { - "regex":/^\d{5}$|^\d{5}-\d{4}$/, - "alertText":"* Invalid zip format" + "regex": /^\d{5}$|^\d{5}-\d{4}$/, + "alertText": "* Invalid zip format" }, "integer": { "regex": /^[\-\+]?\d+$/, @@ -104,22 +103,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* Invalid floating decimal number" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Invalid date, must be in YYYY-MM-DD format" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Invalid date, must be in YYYY-MM-DD format" }, "ipv4": { "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]))$/, @@ -137,7 +136,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Letters only" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Letters only (accents allowed)" }, @@ -153,7 +152,7 @@ "alertText": "* This user is already taken", "alertTextLoad": "* Validating, please wait" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -172,35 +171,35 @@ // speaks by itself "alertTextLoad": "* Validating, please wait" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* This name is already taken", - // speaks by itself - "alertTextLoad": "* Validating, please wait" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* This name is already taken", + // speaks by itself + "alertTextLoad": "* Validating, please wait" + }, "validate2fields": { "alertText": "* Please input HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Invalid Date" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Invalid Date or Date Format", "alertText2": "Expected Format: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-es.js b/js/languages/jquery.validationEngine-es.js index c1d6a97..6f7279e 100644 --- a/js/languages/jquery.validationEngine-es.js +++ b/js/languages/jquery.validationEngine-es.js @@ -1,9 +1,7 @@ - -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +9,8 @@ "alertTextCheckboxMultiple": "* Por favor seleccione una opción", "alertTextCheckboxe": "* Este checkbox es obligatorio" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -22,7 +20,7 @@ "alertText": "* Mínimo de ", "alertText2": " caracteres autorizados" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Debe de rellenar al menos uno de los siguientes campos" }, @@ -31,7 +29,7 @@ "alertText": "* Máximo de ", "alertText2": " caracteres autorizados" }, - "min": { + "min": { "regex": "none", "alertText": "* El valor mínimo es " }, @@ -39,14 +37,14 @@ "regex": "none", "alertText": "* El valor máximo es " }, - "past": { + "past": { "regex": "none", "alertText": "* Fecha anterior a " }, "future": { "regex": "none", "alertText": "* Fecha posterior a " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Se ha excedido el número de opciones permitidas" @@ -88,7 +86,7 @@ "alertText": "* Fecha inválida, por favor utilize el formato DD/MM/AAAA" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Direccion IP inválida" }, "url": { @@ -99,11 +97,11 @@ "regex": /^[0-9\ ]+$/, "alertText": "* Sólo números" }, - "onlyLetterSp": { + "onlyLetterSp": { "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Sólo letras" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Sólo letras" }, @@ -111,31 +109,30 @@ "regex": /^[0-9a-zA-Z]+$/, "alertText": "* No se permiten caracteres especiales" }, - // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings + // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings "ajaxUserCall": { "url": "ajaxValidateFieldUser", - // you may want to pass extra data on the ajax call + // you may want to pass extra data on the ajax call "extraData": "name=eric", "alertTextLoad": "* Cargando, espere por favor", "alertText": "* Este nombre de usuario ya se encuentra usado" }, "ajaxNameCall": { - // remote json service location + // remote json service location "url": "ajaxValidateFieldName", - // error + // error "alertText": "* Este nombre ya se encuentra usado", - // if you provide an "alertTextOk", it will show as a green prompt when the field validates + // if you provide an "alertTextOk", it will show as a green prompt when the field validates "alertTextOk": "* Este nombre está disponible", - // speaks by itself + // speaks by itself "alertTextLoad": "* Cargando, espere por favor" }, "validate2fields": { "alertText": "* Por favor entrar HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); })(jQuery); - diff --git a/js/languages/jquery.validationEngine-et.js b/js/languages/jquery.validationEngine-et.js index 3ddf223..8c647e1 100644 --- a/js/languages/jquery.validationEngine-et.js +++ b/js/languages/jquery.validationEngine-et.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Linnuke on nõutud", "alertTextDateRange": "* Mõlemad kuupäeva valikud on nõutud" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* Maksimaalselt ", "alertText2": " märki lubatud" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Palun täidke üks järgnevatest väljadest" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Kuupäev peale " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maksimaalselt ", @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Tähed ainult" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Tähed ainult" }, @@ -122,21 +121,21 @@ "regex": /^[0-9a-zA-Z]+$/, "alertText": "* Eri tähemärke ei lubata" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Vigane kuupäev" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Vigane kuupäev või kuupäeva formaat", "alertText2": "Eeldatud formaat: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM või ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM või ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-fa.js b/js/languages/jquery.validationEngine-fa.js index fb98030..0f7749e 100644 --- a/js/languages/jquery.validationEngine-fa.js +++ b/js/languages/jquery.validationEngine-fa.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* این چک باکس ضروری است", "alertTextDateRange": "* هر دو فیلد‌های بازه‌ی تاریخی ضروری هستند" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,19 +36,19 @@ "alertText": "* حداکثر ", "alertText2": " حرف وارد کنید" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* شما باید یکی از فیلد‌های زیر را پر کنید" }, "min": { "regex": "none", "alertText": "* کمترین مقدار معتبر ", - "alertText2": " است" + "alertText2": " است" }, "max": { "regex": "none", "alertText": "* بیش‌ترین مقدار معتبر ", - "alertText2": "است" + "alertText2": "است" }, "past": { "regex": "none", @@ -58,7 +57,7 @@ "future": { "regex": "none", "alertText": "* تاریخ‌های بعد از " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* بیش‌ترین گزینه‌ی قابل انتخاب ", @@ -128,7 +127,7 @@ "alertText": "* این نام‌کاربری تکراری است", "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -147,35 +146,35 @@ // speaks by itself "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* این نام تکراری است", - // speaks by itself - "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* این نام تکراری است", + // speaks by itself + "alertTextLoad": "* درحال اعتبار سنجی، لطفا صبر کنید" + }, "validate2fields": { "alertText": "* لطفا مقدار HELLO را وارد کنید" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* تاریخ نامعتبر" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* تاریخ نامعتبر است یا شکل معتبری ندارد", "alertText2": "شکل‌های مورد معتبر: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-fi.js b/js/languages/jquery.validationEngine-fi.js index a0445bf..4fe75ec 100644 --- a/js/languages/jquery.validationEngine-fi.js +++ b/js/languages/jquery.validationEngine-fi.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Yksi valikoima, kiitos", "alertTextCheckboxe": "* Tarkistusmerkki on pakollinen" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -41,7 +40,7 @@ "future": { "regex": "none", "alertText": "* Päivämäärä jälkeen " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Enintään ", @@ -99,7 +98,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Ainoastaan kirjaimin" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Ainoastaan kirjaimin" }, @@ -108,7 +107,7 @@ "alertText": "* Erikoismerkit eivät ole sallittuja" } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-fr.js b/js/languages/jquery.validationEngine-fr.js index 6800139..acb357b 100644 --- a/js/languages/jquery.validationEngine-fr.js +++ b/js/languages/jquery.validationEngine-fr.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { "regex": "none", @@ -10,18 +9,18 @@ "alertTextCheckboxMultiple": "* Choisir une option", "alertTextCheckboxe": "* Cette option est requise" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" }, - "minSize": { + "minSize": { "regex": "none", "alertText": "* Minimum ", "alertText2": " caractères requis" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Vous devez remplir un des champs suivant" }, @@ -30,7 +29,7 @@ "alertText": "* Maximum ", "alertText2": " caractères requis" }, - "min": { + "min": { "regex": "none", "alertText": "* Valeur minimum requise " }, @@ -38,7 +37,7 @@ "regex": "none", "alertText": "* Valeur maximum requise " }, - "past": { + "past": { "regex": "none", "alertText": "* Date antérieure au " }, @@ -87,7 +86,7 @@ "alertText": "* Date invalide, format YYYY-MM-DD requis" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Adresse IP invalide" }, "url": { @@ -106,7 +105,7 @@ "regex": /^[0-9a-zA-Z\u00C0-\u00D6\u00D9-\u00F6\u00F9-\u00FD]+$/, "alertText": "* Aucun caractère spécial n'est accepté" }, - // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings + // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings "ajaxUserCall": { "url": "ajaxValidateFieldUser", "extraData": "name=eric", @@ -126,4 +125,4 @@ } }; $.validationEngineLanguage.newLang(); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/js/languages/jquery.validationEngine-he.js b/js/languages/jquery.validationEngine-he.js index 003b502..1174bd4 100644 --- a/js/languages/jquery.validationEngine-he.js +++ b/js/languages/jquery.validationEngine-he.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* תיבת הבחירה היא חובה", "alertTextDateRange": "* שני תאריכי הטווח הם חובה" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* שדה חייב להיות שווה לבדיקה" @@ -37,7 +36,7 @@ "alertText": "* מותרים לכל היותר ", "alertText2": " תוים" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* חובה למלא אחד מהשדות" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* תאריך מאוחר מ " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* מותרות לכל היותר ", @@ -94,22 +93,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* מספר בעל נקודה עשרונית לא תקין" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* תאריך לא תקין, חייב ליות בתבנית YYYY-MM-DD" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* תאריך לא תקין, חייב ליות בתבנית YYYY-MM-DD" }, "ipv4": { "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]))$/, @@ -127,7 +126,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* אותיות באנגלית בלבד" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* אותיות באנגלית בלבד" }, @@ -136,10 +135,10 @@ "alertText": "* אסורים תוים מיוחדים" } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-hr.js b/js/languages/jquery.validationEngine-hr.js index 89159da..7f799e3 100644 --- a/js/languages/jquery.validationEngine-hr.js +++ b/js/languages/jquery.validationEngine-hr.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Ovaj odabir je obavezan", "alertTextDateRange": "* Oba datuma su obavezna" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* Maksimalno ", "alertText2": " dozvoljenih znakova" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Morate popuniti jedno od obaveznih polja" }, @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Dozvoljena su samo slova" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Dozvoljena su samo slova" }, @@ -130,7 +129,7 @@ "alertText": "* This user is already taken", "alertTextLoad": "* Validating, please wait" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -149,30 +148,30 @@ // speaks by itself "alertTextLoad": "* Validating, please wait" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* This name is already taken", - // speaks by itself - "alertTextLoad": "* Validating, please wait" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* This name is already taken", + // speaks by itself + "alertTextLoad": "* Validating, please wait" + }, "validate2fields": { "alertText": "* Please input HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Neispravan datum" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Neispravan format datuma", "alertText2": "Očekivani format: ", "alertText3": "mm/dd/gggg hh:mm:ss ili ", "alertText4": "gggg-mm-dd hh:mm:ss " - } + } }; } diff --git a/js/languages/jquery.validationEngine-hu.js b/js/languages/jquery.validationEngine-hu.js index c71f194..18b6901 100644 --- a/js/languages/jquery.validationEngine-hu.js +++ b/js/languages/jquery.validationEngine-hu.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Ez az opció be kell legyen jelölve", "alertTextDateRange": "* Mindkét dátum mezőt ki kell tölteni" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* Maximum ", "alertText2": " karakter lehet" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Az alábbi mezők valamelyikét ki kell tölteni" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Dátum ez után " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maximum ", @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Csak betűket" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Csak betűket" }, @@ -130,7 +129,7 @@ "alertText": "* This user is already taken", "alertTextLoad": "* Validating, please wait" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -149,35 +148,35 @@ // speaks by itself "alertTextLoad": "* Validating, please wait" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* This name is already taken", - // speaks by itself - "alertTextLoad": "* Validating, please wait" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* This name is already taken", + // speaks by itself + "alertTextLoad": "* Validating, please wait" + }, "validate2fields": { "alertText": "* Please input HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Invalid Date" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Invalid Date or Date Format", "alertText2": "Expected Format: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-id.js b/js/languages/jquery.validationEngine-id.js index bcccc0e..0695617 100644 --- a/js/languages/jquery.validationEngine-id.js +++ b/js/languages/jquery.validationEngine-id.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Kotak centang ini wajib", "alertTextDateRange": "* Kedua bidang rentang tanggal ini wajib" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Bidang harus sama dengan uji" @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Tanggal sesudah " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maksimum ", @@ -96,20 +95,20 @@ }, "date": { // Check if date is valid by leap year - "func": function (field) { + "func": function(field) { var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); var match = pattern.exec(field.val()); if (match == null) - return false; - + return false; + var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; + var month = match[2] * 1; + var day = match[3] * 1; var date = new Date(year, month - 1, day); // because months starts from 0. - + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Tanggal tidak sah, harus dalam format TTTT-BB-HH" + }, + "alertText": "* Tanggal tidak sah, harus dalam format TTTT-BB-HH" }, "ipv4": { "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]))$/, @@ -127,7 +126,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Huruf saja" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Huruf saja" }, @@ -174,7 +173,7 @@ "alertText": "* Silakan masukan HELLO" }, //tls warning:homegrown not fielded - "dateFormat":{ + "dateFormat": { "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]))$/, "alertText": "* Tanggal Tidak Sah" }, @@ -191,5 +190,5 @@ }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-it.js b/js/languages/jquery.validationEngine-it.js index 3713eab..20f19e4 100644 --- a/js/languages/jquery.validationEngine-it.js +++ b/js/languages/jquery.validationEngine-it.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -12,7 +11,7 @@ "alertTextDateRange": "* Sono richiesti entrambi gli intervalli temporali" }, "requiredInFunction": { - "func": function(field, rules, i, options){ + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Il campo deve avere valore 'test'" @@ -88,12 +87,12 @@ "alertText": "* Indirizzo non corretto" }, "fullname": { - "regex":/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, - "alertText":"* Nome e cognome richiesti" + "regex": /^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, + "alertText": "* Nome e cognome richiesti" }, "zip": { - "regex":/^\d{5}$|^\d{5}-\d{4}$/, - "alertText":"* Formato zip non valido" + "regex": /^\d{5}$|^\d{5}-\d{4}$/, + "alertText": "* Formato zip non valido" }, "integer": { "regex": /^[\-\+]?\d+$/, @@ -105,16 +104,16 @@ "alertText": "* Richiesto un numero decimale" }, "date": { - // Check if date is valid by leap year - "func": function (field) { + // Check if date is valid by leap year + "func": function(field) { var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); var match = pattern.exec(field.val()); if (match == null) return false; var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; + var month = match[2] * 1; + var day = match[3] * 1; var date = new Date(year, month - 1, day); // because months starts from 0. return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); @@ -137,7 +136,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Solo lettere" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Solo lettere (è possibile inserire lettere accentate)" }, @@ -184,7 +183,7 @@ "alertText": "* Prego inserire 'HELLO'" }, //tls warning:homegrown not fielded - "dateFormat":{ + "dateFormat": { "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]))$/, "alertText": "* Data non valida" }, @@ -203,4 +202,4 @@ $.validationEngineLanguage.newLang(); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/js/languages/jquery.validationEngine-ja.js b/js/languages/jquery.validationEngine-ja.js index 39cc3e2..f353ca7 100644 --- a/js/languages/jquery.validationEngine-ja.js +++ b/js/languages/jquery.validationEngine-ja.js @@ -1,15 +1,15 @@ -;/***************************************************************** +; +/***************************************************************** * Japanese language file for jquery.validationEngine.js (ver2.0) * * Transrator: tomotomo ( Tomoyuki SUGITA ) * http://tomotomoSnippet.blogspot.com/ * Licenced under the MIT Licence *******************************************************************/ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -17,8 +17,8 @@ "alertTextCheckboxMultiple": "* 選択してください", "alertTextCheckboxe": "* チェックボックスをチェックしてください" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -28,7 +28,7 @@ "alertText": "* ", "alertText2": "文字以上にしてください" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* You must fill one of the following fields" }, @@ -56,7 +56,7 @@ "regex": "none", "alertText": "* ", "alertText2": " より最近の日付にしてください" - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* チェックしすぎです" @@ -98,7 +98,7 @@ "alertText": "* 日付は半角で YYYY-MM-DD の形式で入力してください" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* IPアドレスが正しくありません" }, "url": { @@ -139,11 +139,8 @@ "alertText": "* 『HELLO』と入力してください" } }; - + } }; $.validationEngineLanguage.newLang(); })(jQuery); - - - diff --git a/js/languages/jquery.validationEngine-lt.js b/js/languages/jquery.validationEngine-lt.js index f8f0f87..c091700 100644 --- a/js/languages/jquery.validationEngine-lt.js +++ b/js/languages/jquery.validationEngine-lt.js @@ -1,170 +1,168 @@ (function($) { - $.fn.validationEngineLanguage = function() { - }; - $.validationEngineLanguage = { - newLang : function() { - $.validationEngineLanguage.allRules = { + $.fn.validationEngineLanguage = function() {}; + $.validationEngineLanguage = { + newLang: function() { + $.validationEngineLanguage.allRules = { - // global messages - "required" : { // Add your regex rules here, you can take - // telephone as an example - "regex" : "none", - "alertText" : "* Privalomas laukas", - "alertTextCheckboxMultiple" : "* Pasirinkite reikšmę", - "alertTextCheckboxe" : "* Pasirinkite reikšmę", - "alertTextDateRange" : "* Pasirinkite reikšmę" - }, - "requiredInFunction" : { - "func" : function(field, rules, i, options) { - return (field.val() == "test") ? true : false; - }, - "alertText" : "* Laukas turi būti lygus test laukui" - }, - "dateRange" : { - "regex" : "none", - "alertText" : "* Neteisinga reikšmė ", - "alertText2" : "Datos intervalas" - }, - "dateTimeRange" : { - "regex" : "none", - "alertText" : "* Neteisinga reikšmė ", - "alertText2" : "Datos ir laiko intervalas" - }, - "minSize" : { - "regex" : "none", - "alertText" : "* Ne mažiau ", - "alertText2" : " simbolių" - }, - "maxSize" : { - "regex" : "none", - "alertText" : "* Ne daugiau ", - "alertText2" : " simbolių" - }, - "groupRequired" : { - "regex" : "none", - "alertText" : "* Užpildykite šiuos laukus " - }, - "min" : { - "regex" : "none", - "alertText" : "* Mažiausia galima reikšmė: " - }, - "max" : { - "regex" : "none", - "alertText" : "* Didžiausia galima reikšmė: " - }, - "past" : { - "regex" : "none", - "alertText" : "* Data iki " - }, - "future" : { - "regex" : "none", - "alertText" : "* Data po " - }, - "maxCheckbox" : { - "regex" : "none", - "alertText" : "* Daugiausiai ", - "alertText2" : " leidžiama pasirinkti" - }, - "minCheckbox" : { - "regex" : "none", - "alertText" : "* Pasirinkite ", - "alertText2" : " laukus" - }, - "equals" : { - "regex" : "none", - "alertText" : "* Laukai nesutampa" - }, - "creditCard" : { - "regex" : "none", - "alertText" : "* Neteisingi kreditinės kortelės duomenys" - }, - "phone" : { - // credit: jquery.h5validate.js / orefalo - "regex" : /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, - "alertText" : "* Invalid phone number" - }, - "email" : { - // HTML5 compatible email regex ( - // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html# - // e-mail-state-%28type=email%29 ) - "regex" : /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, - "alertText" : "* Neteisingas el. pašto adresas" - }, - "integer" : { - "regex" : /^[\-\+]?\d+$/, - "alertText" : "* Neteisingai įvestas skaičius" - }, - "number" : { - // Number, including positive, negative, and floating - // decimal. credit: orefalo - "regex" : /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, - "alertText" : "* Neteisingai įvestas skaičius" - }, - "date" : { - // Check if date is valid by leap year - "func" : function(field) { - var pattern = new RegExp( - /^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; + // global messages + "required": { // Add your regex rules here, you can take + // telephone as an example + "regex": "none", + "alertText": "* Privalomas laukas", + "alertTextCheckboxMultiple": "* Pasirinkite reikšmę", + "alertTextCheckboxe": "* Pasirinkite reikšmę", + "alertTextDateRange": "* Pasirinkite reikšmę" + }, + "requiredInFunction": { + "func": function(field, rules, i, options) { + return (field.val() == "test") ? true : false; + }, + "alertText": "* Laukas turi būti lygus test laukui" + }, + "dateRange": { + "regex": "none", + "alertText": "* Neteisinga reikšmė ", + "alertText2": "Datos intervalas" + }, + "dateTimeRange": { + "regex": "none", + "alertText": "* Neteisinga reikšmė ", + "alertText2": "Datos ir laiko intervalas" + }, + "minSize": { + "regex": "none", + "alertText": "* Ne mažiau ", + "alertText2": " simbolių" + }, + "maxSize": { + "regex": "none", + "alertText": "* Ne daugiau ", + "alertText2": " simbolių" + }, + "groupRequired": { + "regex": "none", + "alertText": "* Užpildykite šiuos laukus " + }, + "min": { + "regex": "none", + "alertText": "* Mažiausia galima reikšmė: " + }, + "max": { + "regex": "none", + "alertText": "* Didžiausia galima reikšmė: " + }, + "past": { + "regex": "none", + "alertText": "* Data iki " + }, + "future": { + "regex": "none", + "alertText": "* Data po " + }, + "maxCheckbox": { + "regex": "none", + "alertText": "* Daugiausiai ", + "alertText2": " leidžiama pasirinkti" + }, + "minCheckbox": { + "regex": "none", + "alertText": "* Pasirinkite ", + "alertText2": " laukus" + }, + "equals": { + "regex": "none", + "alertText": "* Laukai nesutampa" + }, + "creditCard": { + "regex": "none", + "alertText": "* Neteisingi kreditinės kortelės duomenys" + }, + "phone": { + // credit: jquery.h5validate.js / orefalo + "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, + "alertText": "* Invalid phone number" + }, + "email": { + // HTML5 compatible email regex ( + // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html# + // e-mail-state-%28type=email%29 ) + "regex": /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + "alertText": "* Neteisingas el. pašto adresas" + }, + "integer": { + "regex": /^[\-\+]?\d+$/, + "alertText": "* Neteisingai įvestas skaičius" + }, + "number": { + // Number, including positive, negative, and floating + // decimal. credit: orefalo + "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, + "alertText": "* Neteisingai įvestas skaičius" + }, + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp( + /^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; - var year = match[1]; - var month = match[2] * 1; - var day = match[3] * 1; - var date = new Date(year, month - 1, day); // because - // months - // starts - // from 0. + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because + // months + // starts + // from 0. - return (date.getFullYear() == year - && date.getMonth() == (month - 1) && date - .getDate() == day); - }, - "alertText" : "* Datos formatas: YYYY-MM-DD" - }, - "ipv4" : { - "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]))$/, - "alertText" : "* Neteisingas IP adresas" - }, - "url" : { - "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, - "alertText" : "* Neteisinga nuoroda" - }, - "onlyNumberSp" : { - "regex" : /^[0-9\ ]+$/, - "alertText" : "* Tik skaičiai" - }, - "onlyLetterSp" : { - "regex" : /^[a-zA-Z\ \']+$/, - "alertText" : "* Tik raidės" - }, - "onlyLetterAccentSp":{ + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date + .getDate() == day); + }, + "alertText": "* Datos formatas: YYYY-MM-DD" + }, + "ipv4": { + "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]))$/, + "alertText": "* Neteisingas IP adresas" + }, + "url": { + "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, + "alertText": "* Neteisinga nuoroda" + }, + "onlyNumberSp": { + "regex": /^[0-9\ ]+$/, + "alertText": "* Tik skaičiai" + }, + "onlyLetterSp": { + "regex": /^[a-zA-Z\ \']+$/, + "alertText": "* Tik raidės" + }, + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, - "alertText" : "* Tik raidės" - }, - "onlyLetterNumber" : { - "regex" : /^[0-9a-zA-Z]+$/, - "alertText" : "* Specialūs simboliai neleidžiami" - }, - // tls warning:homegrown not fielded - "dateFormat" : { - "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]))$/, - "alertText" : "* Neteisinga data" - }, - // tls warning:homegrown not fielded - "dateTimeFormat" : { - "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})$/, - "alertText" : "* Neteisingai įvesta data ar laikas", - "alertText2" : "Teisingas formatas: ", - "alertText3" : "mm/dd/yyyy hh:mm:ss AM|PM or ", - "alertText4" : "yyyy-mm-dd hh:mm:ss AM|PM" - } - }; + "alertText": "* Tik raidės" + }, + "onlyLetterNumber": { + "regex": /^[0-9a-zA-Z]+$/, + "alertText": "* Specialūs simboliai neleidžiami" + }, + // tls warning:homegrown not fielded + "dateFormat": { + "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]))$/, + "alertText": "* Neteisinga data" + }, + // tls warning:homegrown not fielded + "dateTimeFormat": { + "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})$/, + "alertText": "* Neteisingai įvesta data ar laikas", + "alertText2": "Teisingas formatas: ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", + "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + } + }; - } - }; + } + }; - $.validationEngineLanguage.newLang(); + $.validationEngineLanguage.newLang(); })(jQuery); diff --git a/js/languages/jquery.validationEngine-nl.js b/js/languages/jquery.validationEngine-nl.js index edc6bba..1a017a2 100644 --- a/js/languages/jquery.validationEngine-nl.js +++ b/js/languages/jquery.validationEngine-nl.js @@ -1,141 +1,140 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; - $.validationEngineLanguage = { - newLang: function(){ - $.validationEngineLanguage.allRules = { - "required": { // Add your regex rules here, you can take telephone as an example - "regex": "geen", - "alertText": "* Dit veld is verplicht", - "alertTextCheckboxMultiple": "* Selecteer a.u.b. een optie", - "alertTextCheckboxe": "* Dit selectievakje is verplicht" - }, - "requiredInFunction": { - "func": function(field, rules, i, options){ +(function($) { + $.fn.validationEngineLanguage = function() {}; + $.validationEngineLanguage = { + newLang: function() { + $.validationEngineLanguage.allRules = { + "required": { // Add your regex rules here, you can take telephone as an example + "regex": "geen", + "alertText": "* Dit veld is verplicht", + "alertTextCheckboxMultiple": "* Selecteer a.u.b. een optie", + "alertTextCheckboxe": "* Dit selectievakje is verplicht" + }, + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Velden moeten gelijk zijn" - }, - "minSize": { - "regex": "none", - "alertText": "* Minimaal ", - "alertText2": " karakters toegestaan" - }, - "maxSize": { - "regex": "none", - "alertText": "* Maximaal ", - "alertText2": " karakters toegestaan" - }, - "groupRequired": { + }, + "minSize": { + "regex": "none", + "alertText": "* Minimaal ", + "alertText2": " karakters toegestaan" + }, + "maxSize": { + "regex": "none", + "alertText": "* Maximaal ", + "alertText2": " karakters toegestaan" + }, + "groupRequired": { "regex": "none", "alertText": "* Vul één van de volgende velden in" }, - "min": { - "regex": "none", - "alertText": "* Minimale waarde is " - }, - "max": { - "regex": "none", - "alertText": "* Maximale waarde is " - }, - "past": { - "regex": "none", - "alertText": "* Datum voorafgaand aan " - }, - "future": { - "regex": "none", - "alertText": "* Datum na " - }, - "maxCheckbox": { - "regex": "none", - "alertText": "* Toegestane aantal vinkjes overschreden" - }, - "minCheckbox": { - "regex": "none", - "alertText": "* Selecteer a.u.b. ", - "alertText2": " opties" - }, - "equals": { - "regex": "none", - "alertText": "* Velden komen niet overeen" - }, + "min": { + "regex": "none", + "alertText": "* Minimale waarde is " + }, + "max": { + "regex": "none", + "alertText": "* Maximale waarde is " + }, + "past": { + "regex": "none", + "alertText": "* Datum voorafgaand aan " + }, + "future": { + "regex": "none", + "alertText": "* Datum na " + }, + "maxCheckbox": { + "regex": "none", + "alertText": "* Toegestane aantal vinkjes overschreden" + }, + "minCheckbox": { + "regex": "none", + "alertText": "* Selecteer a.u.b. ", + "alertText2": " opties" + }, + "equals": { + "regex": "none", + "alertText": "* Velden komen niet overeen" + }, "creditCard": { "regex": "none", "alertText": "* Ongeldige credit card nummer" }, - "phone": { - // credit: jquery.h5validate.js / orefalo - "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, - "alertText": "* Ongeldig telefoonnummer" - }, - "email": { - // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ + "phone": { + // credit: jquery.h5validate.js / orefalo + "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, + "alertText": "* Ongeldig telefoonnummer" + }, + "email": { + // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ // Replaced incredible long regex with shorter and working one! :) -// "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, - "regex": /^[a-z0-9]+[a-z0-9._%+-]*@(?:[a-z0-9-]+\.)+[a-z]{2,6}$/i, - "alertText": "* Ongeldig emailadres" - }, - "integer": { - "regex": /^[\-\+]?\d+$/, - "alertText": "* Ongeldig geheel getal" - }, - "number": { - // Number, including positive, negative, and floating decimal. credit: orefalo - "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, - "alertText": "* Ongeldig komma getal" - }, - "date": { - "regex": /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/, - "alertText": "* Ongeldige datum, formaat moet DD-MM-JJJJ zijn" - }, - "ipv4": { - "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]))$/, - "alertText": "* Ongeldig IP-adres" - }, - "url": { + // "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, + "regex": /^[a-z0-9]+[a-z0-9._%+-]*@(?:[a-z0-9-]+\.)+[a-z]{2,6}$/i, + "alertText": "* Ongeldig emailadres" + }, + "integer": { + "regex": /^[\-\+]?\d+$/, + "alertText": "* Ongeldig geheel getal" + }, + "number": { + // Number, including positive, negative, and floating decimal. credit: orefalo + "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, + "alertText": "* Ongeldig komma getal" + }, + "date": { + "regex": /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/, + "alertText": "* Ongeldige datum, formaat moet DD-MM-JJJJ zijn" + }, + "ipv4": { + "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]))$/, + "alertText": "* Ongeldig IP-adres" + }, + "url": { "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, - "alertText": "* Ongeldige URL" - }, - "onlyNumberSp": { - "regex": /^[0-9\ ]+$/, - "alertText": "* Alleen cijfers" - }, - "onlyLetterSp": { - "regex": /^[a-zA-Z\ \']+$/, - "alertText": "* Alleen leestekens" - }, - "onlyLetterAccentSp":{ + "alertText": "* Ongeldige URL" + }, + "onlyNumberSp": { + "regex": /^[0-9\ ]+$/, + "alertText": "* Alleen cijfers" + }, + "onlyLetterSp": { + "regex": /^[a-zA-Z\ \']+$/, + "alertText": "* Alleen leestekens" + }, + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, - "alertText": "* Alleen leestekens" - }, - "onlyLetterNumber": { - "regex": /^[0-9a-zA-Z]+$/, - "alertText": "* Geen vreemde tekens toegestaan" - }, - // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings - "ajaxUserCall": { - "url": "ajaxValidateFieldUser", - // you may want to pass extra data on the ajax call - "extraData": "name=eric", - "alertText": "* Deze gebruiker bestaat al", - "alertTextLoad": "* Bezig met valideren, even geduld aub" - }, - "ajaxNameCall": { - // remote json service location - "url": "ajaxValidateFieldName", - // error - "alertText": "* Deze naam bestaat al", - // if you provide an "alertTextOk", it will show as a green prompt when the field validates - "alertTextOk": "* Deze naam is beschikbaar", - // speaks by itself - "alertTextLoad": "* Bezig met valideren, even geduld aub" - }, - "validate2fields": { - "alertText": "* Voer aub HELLO in" - } - }; + "alertText": "* Alleen leestekens" + }, + "onlyLetterNumber": { + "regex": /^[0-9a-zA-Z]+$/, + "alertText": "* Geen vreemde tekens toegestaan" + }, + // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings + "ajaxUserCall": { + "url": "ajaxValidateFieldUser", + // you may want to pass extra data on the ajax call + "extraData": "name=eric", + "alertText": "* Deze gebruiker bestaat al", + "alertTextLoad": "* Bezig met valideren, even geduld aub" + }, + "ajaxNameCall": { + // remote json service location + "url": "ajaxValidateFieldName", + // error + "alertText": "* Deze naam bestaat al", + // if you provide an "alertTextOk", it will show as a green prompt when the field validates + "alertTextOk": "* Deze naam is beschikbaar", + // speaks by itself + "alertTextLoad": "* Bezig met valideren, even geduld aub" + }, + "validate2fields": { + "alertText": "* Voer aub HELLO in" + } + }; - } - }; - $.validationEngineLanguage.newLang(); + } + }; + $.validationEngineLanguage.newLang(); })(jQuery); diff --git a/js/languages/jquery.validationEngine-no.js b/js/languages/jquery.validationEngine-no.js index 8969d2e..f3a4441 100644 --- a/js/languages/jquery.validationEngine-no.js +++ b/js/languages/jquery.validationEngine-no.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Denne boksen er påkrevd", "alertTextDateRange": "* Begge datofelt må fylles ut" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Feltet må være lik test" @@ -37,7 +36,7 @@ "alertText": "* Maksimalt ", "alertText2": " bokstaver tillatt" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Du må fylle ett av de følgende feltene" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Dato etter " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maksimalt ", @@ -94,22 +93,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* Ugyldig desimaltall" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Ugyldig dato, må være i formatet ÅÅÅÅ-MM-DD" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Ugyldig dato, må være i formatet ÅÅÅÅ-MM-DD" }, "ipv4": { "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]))$/, @@ -127,7 +126,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Kun bokstaver" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Kun bokstaver" }, @@ -143,7 +142,7 @@ "alertText": "* Denne brukeren er allerede tatt", "alertTextLoad": "* Validerer, vennligst vent" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -162,35 +161,35 @@ // speaks by itself "alertTextLoad": "* Validerer, vennligst vent" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Dette navnet er allerede tatt", - // speaks by itself - "alertTextLoad": "* Validerer, vennligst vent" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Dette navnet er allerede tatt", + // speaks by itself + "alertTextLoad": "* Validerer, vennligst vent" + }, "validate2fields": { "alertText": "* Vennligst skriv HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Ugyldig dato" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Ugyldig dato eller datoformat", "alertText2": "Forventet format: ", - "alertText3": "mm/dd/åååå tt:mm:ss AM|PM or ", + "alertText3": "mm/dd/åååå tt:mm:ss AM|PM or ", "alertText4": "åååå-mm-dd tt:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-pl.js b/js/languages/jquery.validationEngine-pl.js index e5ccea5..7abddef 100644 --- a/js/languages/jquery.validationEngine-pl.js +++ b/js/languages/jquery.validationEngine-pl.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Proszę wybrać opcję", "alertTextCheckboxe": "* Pole wymagane" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -26,9 +25,9 @@ "alertText": "* Maksymalna liczba znaków to ", "alertText2": "" }, - "groupRequired": { + "groupRequired": { "regex": "none", - "alertText": "* Proszę wypełnić wymienione opcje" + "alertText": "* Proszę wypełnić wymienione opcje" }, "min": { "regex": "none", @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Data musi być późniejsza niż " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Przekroczona maksymalna liczba opcji" @@ -91,36 +90,38 @@ "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/, "alertText": "* Data musi być w postaci RRRR-MM-DD" }, - "nip":{ - "func": function(field, rules, i, options){ + "nip": { + "func": function(field, rules, i, options) { var nipNumber = field.val().replace(/[\s-]/gi, ''); - var verificator_nip = new Array(6,5,7,2,3,4,5,6,7); + var verificator_nip = new Array(6, 5, 7, 2, 3, 4, 5, 6, 7); if (nipNumber.length == 10) { - var n=0; - for (var i=0; i<9; i++) - { - n += nipNumber[i] * verificator_nip[i]; + var n = 0; + for (var i = 0; i < 9; i++) { + n += nipNumber[i] * verificator_nip[i]; } n %= 11; - if (n == nipNumber[9]) {return true;} + if (n == nipNumber[9]) { + return true; + } } return false; }, "alertText": "* Nieprawidłowy numer NIP" }, - "pesel":{ - "func": function(field, rules, i, options){ + "pesel": { + "func": function(field, rules, i, options) { var pesel = field.val().replace(/[\s-]/gi, ''); - var peselArr = new Array(1,3,7,9,1,3,7,9,1,3); - if(pesel.length == 11){ - var peselCRC=0; - for (var i=0; i<10;i++){ - peselCRC += peselArr[i]*pesel[i]; + var peselArr = new Array(1, 3, 7, 9, 1, 3, 7, 9, 1, 3); + if (pesel.length == 11) { + var peselCRC = 0; + for (var i = 0; i < 10; i++) { + peselCRC += peselArr[i] * pesel[i]; } - peselCRC%=10; - if(peselCRC == 0) peselCRC=10; - peselCRC = 10 - peselCRC; - if(pesel[10]==peselCRC) return true; else return false; + peselCRC %= 10; + if (peselCRC == 0) peselCRC = 10; + peselCRC = 10 - peselCRC; + if (pesel[10] == peselCRC) return true; + else return false; } }, "alertText": "* Nieprawidłowy numer PESEL" @@ -141,7 +142,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Tylko litery" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Tylko litery" }, diff --git a/js/languages/jquery.validationEngine-pt.js b/js/languages/jquery.validationEngine-pt.js index 59d61af..a4d8202 100644 --- a/js/languages/jquery.validationEngine-pt.js +++ b/js/languages/jquery.validationEngine-pt.js @@ -1,18 +1,17 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", "alertText": "* Campo obrigatório", "alertTextCheckboxMultiple": "* Selecione uma opção", - "alertTextCheckboxe": "* Selecione uma ou mais opções", + "alertTextCheckboxe": "* Selecione uma ou mais opções", "alertTextDateRange": "* Ambos os campos de datas são obrigatórios" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,13 +36,13 @@ "alertText": "* Máximo ", "alertText2": " carateres permitidos" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Tem de preencher um dos seguintes campos" }, "min": { "regex": "none", - "alertText": "* O valor mínimo é " + "alertText": "* O valor mínimo é " }, "max": { "regex": "none", @@ -56,11 +55,11 @@ "future": { "regex": "none", "alertText": "* Data posterior a " - }, + }, "maxCheckbox": { "regex": "none", - "alertText": "* O número máximo ", - "alertText2": " de escolhas foi ultrapassado" + "alertText": "* O número máximo ", + "alertText2": " de escolhas foi ultrapassado" }, "minCheckbox": { "regex": "none", @@ -73,7 +72,7 @@ }, "creditCard": { "regex": "none", - "alertText": "* Número do cartão de crédito inválido" + "alertText": "* Número do cartão de crédito inválido" }, "phone": { // credit: jquery.h5validate.js / orefalo @@ -94,22 +93,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* Não é um número decimal" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Data inválida, o formato deve de ser AAAA-MM-DD (ex.2012-12-31)" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Data inválida, o formato deve de ser AAAA-MM-DD (ex.2012-12-31)" }, "ipv4": { "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]))$/, @@ -117,7 +116,7 @@ }, "url": { "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, - "alertText": "* Endereço URL inválido" + "alertText": "* Endereço URL inválido" }, "onlyNumberSp": { "regex": /^[0-9\ ]+$/, @@ -127,7 +126,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Só é permitido letras" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Só letras e espaços são permitidos" }, @@ -140,10 +139,10 @@ "url": "ajaxValidateFieldUser", // you may want to pass extra data on the ajax call "extraData": "name=eric", - "alertText": "* Este nome de utilizador já está sendo utilizado", + "alertText": "* Este nome de utilizador já está sendo utilizado", "alertTextLoad": "* A validar, por favor aguarde" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -156,41 +155,41 @@ // remote json service location "url": "ajaxValidateFieldName", // error - "alertText": "* Este nome já está a ser utilizado", + "alertText": "* Este nome já está a ser utilizado", // if you provide an "alertTextOk", it will show as a green prompt when the field validates - "alertTextOk": "* Este nome está disponível", + "alertTextOk": "* Este nome está disponível", + // speaks by itself + "alertTextLoad": "* A validar, por favor aguarde" + }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Este nome já está a ser utilizado", // speaks by itself "alertTextLoad": "* A validar, por favor aguarde" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Este nome já está a ser utilizado", - // speaks by itself - "alertTextLoad": "* A validar, por favor aguarde" - }, "validate2fields": { - "alertText": "* Por favor escreva HELLO" + "alertText": "* Por favor escreva HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, - "alertText": "* Data inválida" + "alertText": "* Data inválida" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, - "alertText": "* Data inválida ou mal formatada", + "dateTimeFormat": { + "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})$/, + "alertText": "* Data inválida ou mal formatada", "alertText2": "Formato esperado: ", - "alertText3": "mm/dd/aaaa hh:mm:ss AM|PM ou ", + "alertText3": "mm/dd/aaaa hh:mm:ss AM|PM ou ", "alertText4": "aaaa-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-pt_BR.js b/js/languages/jquery.validationEngine-pt_BR.js index 642ba44..f58774b 100644 --- a/js/languages/jquery.validationEngine-pt_BR.js +++ b/js/languages/jquery.validationEngine-pt_BR.js @@ -1,7 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){}; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { "regex": "none", @@ -10,8 +10,8 @@ "alertTextCheckboxe": "* Este checkbox é obrigatório", "alertTextDateRange": "* Ambas as datas do intervalo são obrigatórias" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -34,7 +34,7 @@ "alertText": "* Permitido o máximo de ", "alertText2": " caractere(s)" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Você deve preencher um dos seguintes campos" }, @@ -53,7 +53,7 @@ "future": { "regex": "none", "alertText": "* Data posterior a " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Máximo de ", @@ -108,7 +108,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Apenas letras" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Apenas letras e espaços." }, @@ -117,26 +117,34 @@ "alertText": "* Não são permitidos caracteres especiais" }, "real": { - // Brazilian (Real - R$) money format - "regex": /^([1-9]{1}[\d]{0,2}(\.[\d]{3})*(\,[\d]{0,2})?|[1-9]{1}[\d]{0,}(\,[\d]{0,2})?|0(\,[\d]{0,2})?|(\,[\d]{1,2})?)$/, + // Brazilian (Real - R$) money format + "regex": /^([1-9]{1}[\d]{0,2}(\.[\d]{3})*(\,[\d]{0,2})?|[1-9]{1}[\d]{0,}(\,[\d]{0,2})?|0(\,[\d]{0,2})?|(\,[\d]{1,2})?)$/, "alertText": "* Número decimal inválido" }, "cpf": { // CPF is the Brazilian ID - "func": function(field, rules, i, options){ + "func": function(field, rules, i, options) { cpf = field.val().replace(/[^0-9]+/g, ''); - while(cpf.length < 11) cpf = "0"+ cpf; + while (cpf.length < 11) cpf = "0" + cpf; var expReg = /^0+$|^1+$|^2+$|^3+$|^4+$|^5+$|^6+$|^7+$|^8+$|^9+$/; var a = cpf.split(''); var b = new Number; var c = 11; b += (a[9] * --c); - if ((x = b % 11) < 2) { a[9] = 0 } else { a[9] = 11-x } + if ((x = b % 11) < 2) { + a[9] = 0 + } else { + a[9] = 11 - x + } b = 0; c = 11; - for (y=0; y<10; y++) b += (a[y] * c--); - if ((x = b % 11) < 2) { a[10] = 0; } else { a[10] = 11-x; } + for (y = 0; y < 10; y++) b += (a[y] * c--); + if ((x = b % 11) < 2) { + a[10] = 0; + } else { + a[10] = 11 - x; + } var error = false; if ((cpf.charAt(9) != a[9]) || (cpf.charAt(10) != a[10]) || cpf.match(expReg)) error = true; @@ -146,10 +154,10 @@ "alertTextOK": "CPF válido" } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-ro.js b/js/languages/jquery.validationEngine-ro.js index 33f312b..4f9da67 100644 --- a/js/languages/jquery.validationEngine-ro.js +++ b/js/languages/jquery.validationEngine-ro.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Optiune obligatorie", "alertTextDateRange": "* Campurile data cu ajutorul carora se stabileste perioada sunt obligatorii" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Sunt admise doar literele" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Sunt admise doar literele" }, @@ -150,18 +149,18 @@ "alertTextLoad": "* Se efectueaza validarea. Asteapta..." }, "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Numele nu este disponibil", - // speaks by itself - "alertTextLoad": "* Se efectueaza validarea. Asteapta..." - }, + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Numele nu este disponibil", + // speaks by itself + "alertTextLoad": "* Se efectueaza validarea. Asteapta..." + }, "validate2fields": { "alertText": "* Scrie: HELLO" }, //tls warning:homegrown not fielded - "dateFormat":{ + "dateFormat": { "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]))$/, "alertText": "* Data nu este corecta" }, diff --git a/js/languages/jquery.validationEngine-ru.js b/js/languages/jquery.validationEngine-ru.js index 7b4bed0..4bbb2b6 100644 --- a/js/languages/jquery.validationEngine-ru.js +++ b/js/languages/jquery.validationEngine-ru.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Вы должны выбрать вариант", "alertTextCheckboxe": "* Необходимо отметить" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Значением поля должно быть test" @@ -26,7 +25,7 @@ "alertText": "* Максимум ", "alertText2": " символа(ов)" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Вы должны заполнить одно из следующих полей" }, @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Дата от " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Нельзя выбрать столько вариантов" @@ -87,7 +86,7 @@ "alertText": "* Неправильная дата (должно быть в ДД.MM.ГГГГ формате)" }, "ipv4": { - "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]))$/, + "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]))$/, "alertText": "* Неправильный IP-адрес" }, "url": { @@ -128,9 +127,8 @@ "alertText": "* Пожалуйста, введите HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); })(jQuery); - diff --git a/js/languages/jquery.validationEngine-sr_Cyrl.js b/js/languages/jquery.validationEngine-sr_Cyrl.js index 630ae8a..f262f42 100644 --- a/js/languages/jquery.validationEngine-sr_Cyrl.js +++ b/js/languages/jquery.validationEngine-sr_Cyrl.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Ово поље за потврду је обавезно", "alertTextDateRange": "* Оба поља за распон датума су обавезна" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Поље мора садржати test" @@ -37,7 +36,7 @@ "alertText": "* Највише ", "alertText2": " знакова дозвољено" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Морате попунити једно од следеђих поља", "alertTextCheckboxMultiple": "* Молимо изаберите опцију", @@ -58,7 +57,7 @@ "future": { "regex": "none", "alertText": "* Датум после " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Највише ", @@ -88,12 +87,12 @@ "alertText": "* Неисправна емаил адреса" }, "fullname": { - "regex":/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, - "alertText":"* Мора бити име и презиме" + "regex": /^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, + "alertText": "* Мора бити име и презиме" }, "zip": { - "regex":/^\d{5,6}$/, - "alertText":"* Неисправан поштански број" + "regex": /^\d{5,6}$/, + "alertText": "* Неисправан поштански број" }, "integer": { "regex": /^[\-\+]?\d+$/, @@ -104,22 +103,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* Децимални број није исправан" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Неисправан датум, датум мора бити у YYYY-MM-DD формату" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Неисправан датум, датум мора бити у YYYY-MM-DD формату" }, "ipv4": { "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]))$/, @@ -137,7 +136,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Дозвољена само слова" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Дозвољена само слова" }, @@ -153,7 +152,7 @@ "alertText": "* Ово корисничко име је већ заузето", "alertTextLoad": "* Провера података, молимо сачекајте" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -172,35 +171,35 @@ // speaks by itself "alertTextLoad": "* Провера података, молимо сачекајте" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Ово корисничко име је већ заузето", - // speaks by itself - "alertTextLoad": "* Провера података, молимо сачекајте" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Ово корисничко име је већ заузето", + // speaks by itself + "alertTextLoad": "* Провера података, молимо сачекајте" + }, "validate2fields": { "alertText": "* Молимо унесите HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Неисправан датум" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+$|^(?:(?:(?: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]|[12][0-9]|3[01]){1}\/((1[012]|0?[1-9]){1}\/\d{2,4}\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+)$/, + "dateTimeFormat": { + "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+$|^(?:(?:(?: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]|[12][0-9]|3[01]){1}\/((1[012]|0?[1-9]){1}\/\d{2,4}\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+)$/, "alertText": "* Неисправан датум или формат датума", "alertText2": "Очекивани формат: ", - "alertText3": "mm/dd/yyyy hh:mm:ss или ", + "alertText3": "mm/dd/yyyy hh:mm:ss или ", "alertText4": "yyyy-mm-dd hh:mm:ss" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-sr_Latn.js b/js/languages/jquery.validationEngine-sr_Latn.js index 0292765..8146295 100644 --- a/js/languages/jquery.validationEngine-sr_Latn.js +++ b/js/languages/jquery.validationEngine-sr_Latn.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Ovo polje za potvrdu je obavezno", "alertTextDateRange": "* Oba polja za raspon datuma su obavezna" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Polje mora sadržati test" @@ -37,7 +36,7 @@ "alertText": "* Najviše ", "alertText2": " znakova dozvoljeno" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Morate popuniti jedno od sledećih polja", "alertTextCheckboxMultiple": "* Molimo izaberite opciju", @@ -58,7 +57,7 @@ "future": { "regex": "none", "alertText": "* Datum posle " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Najviše ", @@ -88,12 +87,12 @@ "alertText": "* Neispravna email adresa" }, "fullname": { - "regex":/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, - "alertText":"* Mora biti ime i prezime" + "regex": /^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/, + "alertText": "* Mora biti ime i prezime" }, "zip": { - "regex":/^\d{5,6}$/, - "alertText":"* Neispravan poštanski broj" + "regex": /^\d{5,6}$/, + "alertText": "* Neispravan poštanski broj" }, "integer": { "regex": /^[\-\+]?\d+$/, @@ -104,22 +103,22 @@ "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, "alertText": "* Decimalni broj nije ispravan" }, - "date": { - // Check if date is valid by leap year - "func": function (field) { - var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); - var match = pattern.exec(field.val()); - if (match == null) - return false; - - var year = match[1]; - var month = match[2]*1; - var day = match[3]*1; - var date = new Date(year, month - 1, day); // because months starts from 0. - - return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); - }, - "alertText": "* Neispravan datum, datum mora biti u YYYY-MM-DD formatu" + "date": { + // Check if date is valid by leap year + "func": function(field) { + var pattern = new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/); + var match = pattern.exec(field.val()); + if (match == null) + return false; + + var year = match[1]; + var month = match[2] * 1; + var day = match[3] * 1; + var date = new Date(year, month - 1, day); // because months starts from 0. + + return (date.getFullYear() == year && date.getMonth() == (month - 1) && date.getDate() == day); + }, + "alertText": "* Neispravan datum, datum mora biti u YYYY-MM-DD formatu" }, "ipv4": { "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]))$/, @@ -137,7 +136,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Dozvoljena samo slova" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Dozvoljena samo slova" }, @@ -153,7 +152,7 @@ "alertText": "* Ovo korisničko ime je već zauzeto", "alertTextLoad": "* Provera podataka, molimo sačekajte" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -172,35 +171,35 @@ // speaks by itself "alertTextLoad": "* Provera podataka, molimo sačekajte" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Ovo korisničko ime je dostupno", - // speaks by itself - "alertTextLoad": "* Provera podataka, molimo sačekajte" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Ovo korisničko ime je dostupno", + // speaks by itself + "alertTextLoad": "* Provera podataka, molimo sačekajte" + }, "validate2fields": { "alertText": "* Molimo unesite HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Neispravan datum" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+$|^(?:(?:(?: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]|[12][0-9]|3[01]){1}\/((1[012]|0?[1-9]){1}\/\d{2,4}\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+)$/, + "dateTimeFormat": { + "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+$|^(?:(?:(?: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]|[12][0-9]|3[01]){1}\/((1[012]|0?[1-9]){1}\/\d{2,4}\s+(0?[1-5]|[0-6][0-9]){1}:(1[012]|0?[1-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+)$/, "alertText": "* Neispravan datum ili format datuma", "alertText2": "Očekivani format: ", - "alertText3": "dd/mm/yyyy hh:mm:ss ili ", + "alertText3": "dd/mm/yyyy hh:mm:ss ili ", "alertText4": "yyyy-mm-dd hh:mm:ss" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-sv.js b/js/languages/jquery.validationEngine-sv.js index ce96d45..0ce8087 100644 --- a/js/languages/jquery.validationEngine-sv.js +++ b/js/languages/jquery.validationEngine-sv.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Var god välj ett alternativ", "alertTextCheckboxe": "* Den här kryssrutan måste anges" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -26,7 +25,7 @@ "alertText": "* Maximalt ", "alertText2": " antal tecken" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* You must fill one of the following fields" }, @@ -45,7 +44,7 @@ "future": { "regex": "none", "alertText": "* Datum efter " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Maximalt ", @@ -103,7 +102,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Enbart bokstäver" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Enbart bokstäver" }, @@ -119,7 +118,7 @@ "alertText": "* Användarnamnet är upptaget", "alertTextLoad": "* Validerar, var god vänta" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -138,19 +137,19 @@ // speaks by itself "alertTextLoad": "* Validerar, var god vänta" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Användarnamnet är upptaget", - // speaks by itself - "alertTextLoad": "* Validerar, var god vänta" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Användarnamnet är upptaget", + // speaks by itself + "alertTextLoad": "* Validerar, var god vänta" + }, "validate2fields": { "alertText": "* Ange text HELLO" } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-tr.js b/js/languages/jquery.validationEngine-tr.js index d1c7147..75d1a44 100644 --- a/js/languages/jquery.validationEngine-tr.js +++ b/js/languages/jquery.validationEngine-tr.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -10,8 +9,8 @@ "alertTextCheckboxMultiple": "* Lütfen bir seçeneği işaretleyiniz", "alertTextCheckboxe": "* Bu onay kutusu zorunludur" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -26,7 +25,7 @@ "alertText": "* Bu alana en fazla ", "alertText2": " karakter girebilirsiniz" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* You must fill one of the following fields" }, @@ -48,7 +47,7 @@ "alertText": "* Lütfen ", "alertText2": " tarihinden daha geri bir tarih giriniz " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* En fazla ", @@ -106,7 +105,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Bu alanda sadece harf olmalı" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ \']+$/i, "alertText": "* Bu alanda sadece harf olmalı" }, @@ -122,7 +121,7 @@ "alertText": "* Bu kullanıcı adı kullanımda", "alertTextLoad": "* Doğrulanıyor, lütfen bekleyiniz" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -141,19 +140,19 @@ // speaks by itself "alertTextLoad": "* Doğrulanıyor, lütfen bekleyiniz" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Bu isim kullanımda", - // speaks by itself - "alertTextLoad": "* Doğrulanıyor, lütfen bekleyiniz" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Bu isim kullanımda", + // speaks by itself + "alertTextLoad": "* Doğrulanıyor, lütfen bekleyiniz" + }, "validate2fields": { "alertText": "* Lütfen 'HELLO' yazın" } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-vi.js b/js/languages/jquery.validationEngine-vi.js index 5b9b6ca..3f14096 100644 --- a/js/languages/jquery.validationEngine-vi.js +++ b/js/languages/jquery.validationEngine-vi.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* Checkbox này bắt buộc", "alertTextDateRange": "* Cả hai trường ngày tháng đều bắt buộc" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Giá trị của trường phải là test" @@ -37,7 +36,7 @@ "alertText": "* Tối đa ", "alertText2": " số ký tự được cho phép" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* Bạn phải điền một trong những trường sau" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* Ngày đã qua " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* Tối đa ", @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* Chỉ điền chữ" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* Chỉ điền chữ" }, @@ -130,7 +129,7 @@ "alertText": "* Tên này được dùng", "alertTextLoad": "* Đang xác nhận, vui lòng chờ" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -149,35 +148,35 @@ // speaks by itself "alertTextLoad": "* Đang xác nhận, vui lòng chờ" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* Tên này được dùng", - // speaks by itself - "alertTextLoad": "* Đang xác nhận, vui lòng chờ" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* Tên này được dùng", + // speaks by itself + "alertTextLoad": "* Đang xác nhận, vui lòng chờ" + }, "validate2fields": { "alertText": "* Vui lòng nhập vào HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* Ngày sai" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* Ngày sai hoặc định dạng ngày sai", "alertText2": "Định dạng đúng là: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM hay ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM hay ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); - + })(jQuery); diff --git a/js/languages/jquery.validationEngine-zh_CN.js b/js/languages/jquery.validationEngine-zh_CN.js index 1eea97c..1d81a81 100644 --- a/js/languages/jquery.validationEngine-zh_CN.js +++ b/js/languages/jquery.validationEngine-zh_CN.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* 您必须钩选此栏", "alertTextDateRange": "* 日期范围不可空白" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* 最多 ", "alertText2": " 个字符" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* 你必需选填其中一个栏位" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* 日期必需晚于 " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* 最多选取 ", @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* 只接受英文字母大小写" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ ]+$/i, "alertText": "* 只接受英文字母大小写" }, @@ -130,7 +129,7 @@ "alertText": "* 此名称已被其他人使用", "alertTextLoad": "* 正在确认名称是否有其他人使用,请稍等。" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -149,32 +148,32 @@ // speaks by itself "alertTextLoad": "* 正在确认名称是否有其他人使用,请稍等。" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* 此名称已被其他人使用", - // speaks by itself - "alertTextLoad": "* 正在确认名称是否有其他人使用,请稍等。" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* 此名称已被其他人使用", + // speaks by itself + "alertTextLoad": "* 正在确认名称是否有其他人使用,请稍等。" + }, "validate2fields": { "alertText": "* 请输入 HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* 无效的日期格式" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* 无效的日期或时间格式", "alertText2": "可接受的格式: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); diff --git a/js/languages/jquery.validationEngine-zh_TW.js b/js/languages/jquery.validationEngine-zh_TW.js index c2908d0..84f22ae 100644 --- a/js/languages/jquery.validationEngine-zh_TW.js +++ b/js/languages/jquery.validationEngine-zh_TW.js @@ -1,8 +1,7 @@ -(function($){ - $.fn.validationEngineLanguage = function(){ - }; +(function($) { + $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { - newLang: function(){ + newLang: function() { $.validationEngineLanguage.allRules = { "required": { // Add your regex rules here, you can take telephone as an example "regex": "none", @@ -11,8 +10,8 @@ "alertTextCheckboxe": "* 您必需勾選此欄位", "alertTextDateRange": "* 日期範圍欄位都不可空白" }, - "requiredInFunction": { - "func": function(field, rules, i, options){ + "requiredInFunction": { + "func": function(field, rules, i, options) { return (field.val() == "test") ? true : false; }, "alertText": "* Field must equal test" @@ -37,7 +36,7 @@ "alertText": "* 最多 ", "alertText2": " 個字元" }, - "groupRequired": { + "groupRequired": { "regex": "none", "alertText": "* 你必需選填其中一個欄位" }, @@ -56,7 +55,7 @@ "future": { "regex": "none", "alertText": "* 日期必需晚於 " - }, + }, "maxCheckbox": { "regex": "none", "alertText": "* 最多選取 ", @@ -114,7 +113,7 @@ "regex": /^[a-zA-Z\ \']+$/, "alertText": "* 只接受英文字母大小寫" }, - "onlyLetterAccentSp":{ + "onlyLetterAccentSp": { "regex": /^[a-z\u00C0-\u017F\ \']+$/i, "alertText": "* 只接受英文字母大小寫" }, @@ -130,7 +129,7 @@ "alertText": "* 此名稱已經被其他人使用", "alertTextLoad": "* 正在確認名稱是否有其他人使用,請稍等。" }, - "ajaxUserCallPhp": { + "ajaxUserCallPhp": { "url": "phpajax/ajaxValidateFieldUser.php", // you may want to pass extra data on the ajax call "extraData": "name=eric", @@ -149,32 +148,32 @@ // speaks by itself "alertTextLoad": "* 正在確認名稱是否有其他人使用,請稍等。" }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* 此名稱已經被其他人使用", - // speaks by itself - "alertTextLoad": "* 正在確認名稱是否有其他人使用,請稍等。" - }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* 此名稱已經被其他人使用", + // speaks by itself + "alertTextLoad": "* 正在確認名稱是否有其他人使用,請稍等。" + }, "validate2fields": { "alertText": "* 請輸入 HELLO" }, - //tls warning:homegrown not fielded - "dateFormat":{ + //tls warning:homegrown not fielded + "dateFormat": { "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]))$/, "alertText": "* 無效的日期格式" }, //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, + "dateTimeFormat": { + "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})$/, "alertText": "* 無效的日期或時間格式", "alertText2": "可接受的格式: ", - "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", + "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" - } + } }; - + } }; $.validationEngineLanguage.newLang(); From 204ef9b36cefc6440c00c9daab48b6c84ae09c4e Mon Sep 17 00:00:00 2001 From: Razvan Moraru Date: Wed, 11 Mar 2015 08:29:26 +0100 Subject: [PATCH 2/2] Adding hexcolor validation --- js/languages/jquery.validationEngine-ca.js | 4 + js/languages/jquery.validationEngine-cz.js | 4 + js/languages/jquery.validationEngine-da.js | 4 + js/languages/jquery.validationEngine-de.js | 4 + js/languages/jquery.validationEngine-el.js | 4 + js/languages/jquery.validationEngine-en.js | 4 + js/languages/jquery.validationEngine-es.js | 4 + js/languages/jquery.validationEngine-et.js | 4 + js/languages/jquery.validationEngine-fa.js | 4 + js/languages/jquery.validationEngine-fi.js | 4 + js/languages/jquery.validationEngine-fr.js | 4 + js/languages/jquery.validationEngine-he.js | 6 +- js/languages/jquery.validationEngine-hr.js | 352 +++++++++--------- js/languages/jquery.validationEngine-hu.js | 7 +- js/languages/jquery.validationEngine-id.js | 4 + js/languages/jquery.validationEngine-it.js | 4 + js/languages/jquery.validationEngine-ja.js | 4 + js/languages/jquery.validationEngine-lt.js | 4 + js/languages/jquery.validationEngine-nl.js | 4 + js/languages/jquery.validationEngine-no.js | 4 + js/languages/jquery.validationEngine-pl.js | 4 + js/languages/jquery.validationEngine-pt.js | 4 + js/languages/jquery.validationEngine-pt_BR.js | 4 + js/languages/jquery.validationEngine-ro.js | 4 + js/languages/jquery.validationEngine-ru.js | 4 + .../jquery.validationEngine-sr_Cyrl.js | 4 + .../jquery.validationEngine-sr_Latn.js | 4 + js/languages/jquery.validationEngine-sv.js | 4 + js/languages/jquery.validationEngine-tr.js | 4 + js/languages/jquery.validationEngine-vi.js | 5 +- js/languages/jquery.validationEngine-zh_CN.js | 4 + js/languages/jquery.validationEngine-zh_TW.js | 4 + 32 files changed, 302 insertions(+), 180 deletions(-) diff --git a/js/languages/jquery.validationEngine-ca.js b/js/languages/jquery.validationEngine-ca.js index e2d7748..8e40588 100644 --- a/js/languages/jquery.validationEngine-ca.js +++ b/js/languages/jquery.validationEngine-ca.js @@ -129,6 +129,10 @@ }, "validate2fields": { "alertText": "* Si us plau, introduir HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-cz.js b/js/languages/jquery.validationEngine-cz.js index 062ae95..a678e53 100644 --- a/js/languages/jquery.validationEngine-cz.js +++ b/js/languages/jquery.validationEngine-cz.js @@ -150,6 +150,10 @@ }, "validate2fields": { "alertText": "* Prosím napište HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-da.js b/js/languages/jquery.validationEngine-da.js index c87d569..e8cded4 100644 --- a/js/languages/jquery.validationEngine-da.js +++ b/js/languages/jquery.validationEngine-da.js @@ -129,6 +129,10 @@ }, "validate2fields": { "alertText": "* Indsæt venligst HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-de.js b/js/languages/jquery.validationEngine-de.js index 14371c8..aaf3c17 100644 --- a/js/languages/jquery.validationEngine-de.js +++ b/js/languages/jquery.validationEngine-de.js @@ -126,6 +126,10 @@ }, "validate2fields": { "alertText": "* Bitte HELLO eingeben" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-el.js b/js/languages/jquery.validationEngine-el.js index 438d59c..caf6308 100644 --- a/js/languages/jquery.validationEngine-el.js +++ b/js/languages/jquery.validationEngine-el.js @@ -180,6 +180,10 @@ "alertText2": "Expected Format: ", "alertText3": "dd/mm/yyyy hh:mm:ss AM|PM or ", "alertText4": "dd/mm/yyyy HH:mm:ss " + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-en.js b/js/languages/jquery.validationEngine-en.js index e04d952..e8011a1 100644 --- a/js/languages/jquery.validationEngine-en.js +++ b/js/languages/jquery.validationEngine-en.js @@ -194,6 +194,10 @@ "alertText2": "Expected Format: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-es.js b/js/languages/jquery.validationEngine-es.js index 6f7279e..6c84799 100644 --- a/js/languages/jquery.validationEngine-es.js +++ b/js/languages/jquery.validationEngine-es.js @@ -129,6 +129,10 @@ }, "validate2fields": { "alertText": "* Por favor entrar HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-et.js b/js/languages/jquery.validationEngine-et.js index 8c647e1..61fb03f 100644 --- a/js/languages/jquery.validationEngine-et.js +++ b/js/languages/jquery.validationEngine-et.js @@ -133,6 +133,10 @@ "alertText2": "Eeldatud formaat: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM või ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-fa.js b/js/languages/jquery.validationEngine-fa.js index 0f7749e..3c54325 100644 --- a/js/languages/jquery.validationEngine-fa.js +++ b/js/languages/jquery.validationEngine-fa.js @@ -169,6 +169,10 @@ "alertText2": "شکل‌های مورد معتبر: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-fi.js b/js/languages/jquery.validationEngine-fi.js index 4fe75ec..633cdf1 100644 --- a/js/languages/jquery.validationEngine-fi.js +++ b/js/languages/jquery.validationEngine-fi.js @@ -105,6 +105,10 @@ "onlyLetterNumber": { "regex": /^[0-9a-zA-Z]+$/, "alertText": "* Erikoismerkit eivät ole sallittuja" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-fr.js b/js/languages/jquery.validationEngine-fr.js index acb357b..f583cff 100644 --- a/js/languages/jquery.validationEngine-fr.js +++ b/js/languages/jquery.validationEngine-fr.js @@ -120,6 +120,10 @@ }, "validate2fields": { "alertText": "Veuillez taper le mot HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; } diff --git a/js/languages/jquery.validationEngine-he.js b/js/languages/jquery.validationEngine-he.js index 1174bd4..2de2de3 100644 --- a/js/languages/jquery.validationEngine-he.js +++ b/js/languages/jquery.validationEngine-he.js @@ -133,12 +133,14 @@ "onlyLetterNumber": { "regex": /^[0-9a-zA-Z]+$/, "alertText": "* אסורים תוים מיוחדים" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; - } }; - $.validationEngineLanguage.newLang(); })(jQuery); diff --git a/js/languages/jquery.validationEngine-hr.js b/js/languages/jquery.validationEngine-hr.js index 7f799e3..abd0ae5 100644 --- a/js/languages/jquery.validationEngine-hr.js +++ b/js/languages/jquery.validationEngine-hr.js @@ -1,180 +1,184 @@ (function($) { - $.fn.validationEngineLanguage = function() {}; - $.validationEngineLanguage = { - newLang: function() { - $.validationEngineLanguage.allRules = { - "required": { // Add your regex rules here, you can take telephone as an example - "regex": "none", - "alertText": "* Ovo polje je obavezno", - "alertTextCheckboxMultiple": "* Molimo odaberite opciju", - "alertTextCheckboxe": "* Ovaj odabir je obavezan", - "alertTextDateRange": "* Oba datuma su obavezna" - }, - "requiredInFunction": { - "func": function(field, rules, i, options) { - return (field.val() == "test") ? true : false; - }, - "alertText": "* Field must equal test" - }, - "dateRange": { - "regex": "none", - "alertText": "* Greška ", - "alertText2": "Raspon datuma" - }, - "dateTimeRange": { - "regex": "none", - "alertText": "* Greška ", - "alertText2": "Raspon vremena i datuma" - }, - "minSize": { - "regex": "none", - "alertText": "* Minimalno ", - "alertText2": " dozvoljenih znakova" - }, - "maxSize": { - "regex": "none", - "alertText": "* Maksimalno ", - "alertText2": " dozvoljenih znakova" - }, - "groupRequired": { - "regex": "none", - "alertText": "* Morate popuniti jedno od obaveznih polja" - }, - "min": { - "regex": "none", - "alertText": "* Minimalna vrijednost je " - }, - "max": { - "regex": "none", - "alertText": "* Maksimalna vrijednost je " - }, - "past": { - "regex": "none", - "alertText": "* Datum raniji od " - }, - "future": { - "regex": "none", - "alertText": "* Datum nakon " - }, - "maxCheckbox": { - "regex": "none", - "alertText": "* Maksimalno ", - "alertText2": " dozvoljenih opcija" - }, - "minCheckbox": { - "regex": "none", - "alertText": "* Molimo odaberite ", - "alertText2": " opcija" - }, - "equals": { - "regex": "none", - "alertText": "* Polja se ne podudaraju" - }, - "creditCard": { - "regex": "none", - "alertText": "* Neispravan broj kreditne kartice" - }, - "phone": { - // credit: jquery.h5validate.js / orefalo - "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, - "alertText": "* Pogrešan unos telefonskog broja" - }, - "email": { - // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ - "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, - "alertText": "* Neispravna email adresa" - }, - "integer": { - "regex": /^[\-\+]?\d+$/, - "alertText": "* Neispravno unesen broj" - }, - "number": { - // Number, including positive, negative, and floating decimal. credit: orefalo - "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, - "alertText": "* Neispravan broj sa pomičnim zarezom" - }, - "date": { - "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/, - "alertText": "* Neispravan unos datuma, ispravan format je GGGG-MM-DD" - }, - "ipv4": { - "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]))$/, - "alertText": "* neispravna IP adresa" - }, - "url": { - "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, - "alertText": "* Neispravan URL" - }, - "onlyNumberSp": { - "regex": /^[0-9\ ]+$/, - "alertText": "* Dozvoljeni su samo brojevi" - }, - "onlyLetterSp": { - "regex": /^[a-zA-Z\ \']+$/, - "alertText": "* Dozvoljena su samo slova" - }, - "onlyLetterAccentSp": { - "regex": /^[a-z\u00C0-\u017F\ ]+$/i, - "alertText": "* Dozvoljena su samo slova" - }, - "onlyLetterNumber": { - "regex": /^[0-9a-zA-Z]+$/, - "alertText": "* Nisu dozvoljeni specijalni znakovi" - }, - // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings - "ajaxUserCall": { - "url": "ajaxValidateFieldUser", - // you may want to pass extra data on the ajax call - "extraData": "name=eric", - "alertText": "* This user is already taken", - "alertTextLoad": "* Validating, please wait" - }, - "ajaxUserCallPhp": { - "url": "phpajax/ajaxValidateFieldUser.php", - // you may want to pass extra data on the ajax call - "extraData": "name=eric", - // if you provide an "alertTextOk", it will show as a green prompt when the field validates - "alertTextOk": "* This username is available", - "alertText": "* This user is already taken", - "alertTextLoad": "* Validating, please wait" - }, - "ajaxNameCall": { - // remote json service location - "url": "ajaxValidateFieldName", - // error - "alertText": "* This name is already taken", - // if you provide an "alertTextOk", it will show as a green prompt when the field validates - "alertTextOk": "* This name is available", - // speaks by itself - "alertTextLoad": "* Validating, please wait" - }, - "ajaxNameCallPhp": { - // remote json service location - "url": "phpajax/ajaxValidateFieldName.php", - // error - "alertText": "* This name is already taken", - // speaks by itself - "alertTextLoad": "* Validating, please wait" - }, - "validate2fields": { - "alertText": "* Please input HELLO" - }, - //tls warning:homegrown not fielded - "dateFormat": { - "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]))$/, - "alertText": "* Neispravan datum" - }, - //tls warning:homegrown not fielded - "dateTimeFormat": { - "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})$/, - "alertText": "* Neispravan format datuma", - "alertText2": "Očekivani format: ", - "alertText3": "mm/dd/gggg hh:mm:ss ili ", - "alertText4": "gggg-mm-dd hh:mm:ss " + $.fn.validationEngineLanguage = function() {}; + $.validationEngineLanguage = { + newLang: function() { + $.validationEngineLanguage.allRules = { + "required": { // Add your regex rules here, you can take telephone as an example + "regex": "none", + "alertText": "* Ovo polje je obavezno", + "alertTextCheckboxMultiple": "* Molimo odaberite opciju", + "alertTextCheckboxe": "* Ovaj odabir je obavezan", + "alertTextDateRange": "* Oba datuma su obavezna" + }, + "requiredInFunction": { + "func": function(field, rules, i, options) { + return (field.val() == "test") ? true : false; + }, + "alertText": "* Field must equal test" + }, + "dateRange": { + "regex": "none", + "alertText": "* Greška ", + "alertText2": "Raspon datuma" + }, + "dateTimeRange": { + "regex": "none", + "alertText": "* Greška ", + "alertText2": "Raspon vremena i datuma" + }, + "minSize": { + "regex": "none", + "alertText": "* Minimalno ", + "alertText2": " dozvoljenih znakova" + }, + "maxSize": { + "regex": "none", + "alertText": "* Maksimalno ", + "alertText2": " dozvoljenih znakova" + }, + "groupRequired": { + "regex": "none", + "alertText": "* Morate popuniti jedno od obaveznih polja" + }, + "min": { + "regex": "none", + "alertText": "* Minimalna vrijednost je " + }, + "max": { + "regex": "none", + "alertText": "* Maksimalna vrijednost je " + }, + "past": { + "regex": "none", + "alertText": "* Datum raniji od " + }, + "future": { + "regex": "none", + "alertText": "* Datum nakon " + }, + "maxCheckbox": { + "regex": "none", + "alertText": "* Maksimalno ", + "alertText2": " dozvoljenih opcija" + }, + "minCheckbox": { + "regex": "none", + "alertText": "* Molimo odaberite ", + "alertText2": " opcija" + }, + "equals": { + "regex": "none", + "alertText": "* Polja se ne podudaraju" + }, + "creditCard": { + "regex": "none", + "alertText": "* Neispravan broj kreditne kartice" + }, + "phone": { + // credit: jquery.h5validate.js / orefalo + "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/, + "alertText": "* Pogrešan unos telefonskog broja" + }, + "email": { + // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/ + "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, + "alertText": "* Neispravna email adresa" + }, + "integer": { + "regex": /^[\-\+]?\d+$/, + "alertText": "* Neispravno unesen broj" + }, + "number": { + // Number, including positive, negative, and floating decimal. credit: orefalo + "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/, + "alertText": "* Neispravan broj sa pomičnim zarezom" + }, + "date": { + "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/, + "alertText": "* Neispravan unos datuma, ispravan format je GGGG-MM-DD" + }, + "ipv4": { + "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]))$/, + "alertText": "* neispravna IP adresa" + }, + "url": { + "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, + "alertText": "* Neispravan URL" + }, + "onlyNumberSp": { + "regex": /^[0-9\ ]+$/, + "alertText": "* Dozvoljeni su samo brojevi" + }, + "onlyLetterSp": { + "regex": /^[a-zA-Z\ \']+$/, + "alertText": "* Dozvoljena su samo slova" + }, + "onlyLetterAccentSp": { + "regex": /^[a-z\u00C0-\u017F\ ]+$/i, + "alertText": "* Dozvoljena su samo slova" + }, + "onlyLetterNumber": { + "regex": /^[0-9a-zA-Z]+$/, + "alertText": "* Nisu dozvoljeni specijalni znakovi" + }, + // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings + "ajaxUserCall": { + "url": "ajaxValidateFieldUser", + // you may want to pass extra data on the ajax call + "extraData": "name=eric", + "alertText": "* This user is already taken", + "alertTextLoad": "* Validating, please wait" + }, + "ajaxUserCallPhp": { + "url": "phpajax/ajaxValidateFieldUser.php", + // you may want to pass extra data on the ajax call + "extraData": "name=eric", + // if you provide an "alertTextOk", it will show as a green prompt when the field validates + "alertTextOk": "* This username is available", + "alertText": "* This user is already taken", + "alertTextLoad": "* Validating, please wait" + }, + "ajaxNameCall": { + // remote json service location + "url": "ajaxValidateFieldName", + // error + "alertText": "* This name is already taken", + // if you provide an "alertTextOk", it will show as a green prompt when the field validates + "alertTextOk": "* This name is available", + // speaks by itself + "alertTextLoad": "* Validating, please wait" + }, + "ajaxNameCallPhp": { + // remote json service location + "url": "phpajax/ajaxValidateFieldName.php", + // error + "alertText": "* This name is already taken", + // speaks by itself + "alertTextLoad": "* Validating, please wait" + }, + "validate2fields": { + "alertText": "* Please input HELLO" + }, + //tls warning:homegrown not fielded + "dateFormat": { + "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]))$/, + "alertText": "* Neispravan datum" + }, + //tls warning:homegrown not fielded + "dateTimeFormat": { + "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})$/, + "alertText": "* Neispravan format datuma", + "alertText2": "Očekivani format: ", + "alertText3": "mm/dd/gggg hh:mm:ss ili ", + "alertText4": "gggg-mm-dd hh:mm:ss " + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" + }, } }; } - }; - $.validationEngineLanguage.newLang(); + }; $.validationEngineLanguage.newLang(); })(jQuery); diff --git a/js/languages/jquery.validationEngine-hu.js b/js/languages/jquery.validationEngine-hu.js index 18b6901..022d4d9 100644 --- a/js/languages/jquery.validationEngine-hu.js +++ b/js/languages/jquery.validationEngine-hu.js @@ -171,12 +171,13 @@ "alertText2": "Expected Format: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; - } }; - $.validationEngineLanguage.newLang(); - })(jQuery); diff --git a/js/languages/jquery.validationEngine-id.js b/js/languages/jquery.validationEngine-id.js index 0695617..8a5c669 100644 --- a/js/languages/jquery.validationEngine-id.js +++ b/js/languages/jquery.validationEngine-id.js @@ -185,6 +185,10 @@ "alertText3": "bb/hh/tttt jj:mm:dd atau ", "alertText4": "tttt-bb-hh jj:mm:dd" }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" + } } } }; diff --git a/js/languages/jquery.validationEngine-it.js b/js/languages/jquery.validationEngine-it.js index 20f19e4..7b25a17 100644 --- a/js/languages/jquery.validationEngine-it.js +++ b/js/languages/jquery.validationEngine-it.js @@ -194,6 +194,10 @@ "alertText2": "Formato richiesto: ", "alertText3": "mm/gg/aaaa oo:mm:ss AM|PM oppure ", "alertText4": "aaaa-mm-gg oo:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-ja.js b/js/languages/jquery.validationEngine-ja.js index f353ca7..06abb6c 100644 --- a/js/languages/jquery.validationEngine-ja.js +++ b/js/languages/jquery.validationEngine-ja.js @@ -137,6 +137,10 @@ }, "validate2fields": { "alertText": "* 『HELLO』と入力してください" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-lt.js b/js/languages/jquery.validationEngine-lt.js index c091700..d401854 100644 --- a/js/languages/jquery.validationEngine-lt.js +++ b/js/languages/jquery.validationEngine-lt.js @@ -157,6 +157,10 @@ "alertText2": "Teisingas formatas: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-nl.js b/js/languages/jquery.validationEngine-nl.js index 1a017a2..d9f3c0c 100644 --- a/js/languages/jquery.validationEngine-nl.js +++ b/js/languages/jquery.validationEngine-nl.js @@ -131,6 +131,10 @@ }, "validate2fields": { "alertText": "* Voer aub HELLO in" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-no.js b/js/languages/jquery.validationEngine-no.js index f3a4441..df4edd7 100644 --- a/js/languages/jquery.validationEngine-no.js +++ b/js/languages/jquery.validationEngine-no.js @@ -184,6 +184,10 @@ "alertText2": "Forventet format: ", "alertText3": "mm/dd/åååå tt:mm:ss AM|PM or ", "alertText4": "åååå-mm-dd tt:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-pl.js b/js/languages/jquery.validationEngine-pl.js index 7abddef..86fc803 100644 --- a/js/languages/jquery.validationEngine-pl.js +++ b/js/languages/jquery.validationEngine-pl.js @@ -170,6 +170,10 @@ }, "validate2fields": { "alertText": "* Proszę wpisać HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; } diff --git a/js/languages/jquery.validationEngine-pt.js b/js/languages/jquery.validationEngine-pt.js index a4d8202..9d20fab 100644 --- a/js/languages/jquery.validationEngine-pt.js +++ b/js/languages/jquery.validationEngine-pt.js @@ -184,6 +184,10 @@ "alertText2": "Formato esperado: ", "alertText3": "mm/dd/aaaa hh:mm:ss AM|PM ou ", "alertText4": "aaaa-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-pt_BR.js b/js/languages/jquery.validationEngine-pt_BR.js index f58774b..743611d 100644 --- a/js/languages/jquery.validationEngine-pt_BR.js +++ b/js/languages/jquery.validationEngine-pt_BR.js @@ -152,6 +152,10 @@ }, "alertText": "CPF inválido", "alertTextOK": "CPF válido" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-ro.js b/js/languages/jquery.validationEngine-ro.js index 4f9da67..afa349f 100644 --- a/js/languages/jquery.validationEngine-ro.js +++ b/js/languages/jquery.validationEngine-ro.js @@ -171,6 +171,10 @@ "alertText2": "Formatele recunoscute sunt: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM sau ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-ru.js b/js/languages/jquery.validationEngine-ru.js index 4bbb2b6..75884a9 100644 --- a/js/languages/jquery.validationEngine-ru.js +++ b/js/languages/jquery.validationEngine-ru.js @@ -125,6 +125,10 @@ }, "validate2fields": { "alertText": "* Пожалуйста, введите HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-sr_Cyrl.js b/js/languages/jquery.validationEngine-sr_Cyrl.js index f262f42..c0175d4 100644 --- a/js/languages/jquery.validationEngine-sr_Cyrl.js +++ b/js/languages/jquery.validationEngine-sr_Cyrl.js @@ -194,6 +194,10 @@ "alertText2": "Очекивани формат: ", "alertText3": "mm/dd/yyyy hh:mm:ss или ", "alertText4": "yyyy-mm-dd hh:mm:ss" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-sr_Latn.js b/js/languages/jquery.validationEngine-sr_Latn.js index 8146295..1a4276f 100644 --- a/js/languages/jquery.validationEngine-sr_Latn.js +++ b/js/languages/jquery.validationEngine-sr_Latn.js @@ -194,6 +194,10 @@ "alertText2": "Očekivani format: ", "alertText3": "dd/mm/yyyy hh:mm:ss ili ", "alertText4": "yyyy-mm-dd hh:mm:ss" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-sv.js b/js/languages/jquery.validationEngine-sv.js index 0ce8087..8333808 100644 --- a/js/languages/jquery.validationEngine-sv.js +++ b/js/languages/jquery.validationEngine-sv.js @@ -147,6 +147,10 @@ }, "validate2fields": { "alertText": "* Ange text HELLO" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-tr.js b/js/languages/jquery.validationEngine-tr.js index 75d1a44..783e981 100644 --- a/js/languages/jquery.validationEngine-tr.js +++ b/js/languages/jquery.validationEngine-tr.js @@ -150,6 +150,10 @@ }, "validate2fields": { "alertText": "* Lütfen 'HELLO' yazın" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-vi.js b/js/languages/jquery.validationEngine-vi.js index 3f14096..9da8100 100644 --- a/js/languages/jquery.validationEngine-vi.js +++ b/js/languages/jquery.validationEngine-vi.js @@ -171,9 +171,12 @@ "alertText2": "Định dạng đúng là: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM hay ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; - } }; diff --git a/js/languages/jquery.validationEngine-zh_CN.js b/js/languages/jquery.validationEngine-zh_CN.js index 1d81a81..9d8d0a5 100644 --- a/js/languages/jquery.validationEngine-zh_CN.js +++ b/js/languages/jquery.validationEngine-zh_CN.js @@ -171,6 +171,10 @@ "alertText2": "可接受的格式: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } }; diff --git a/js/languages/jquery.validationEngine-zh_TW.js b/js/languages/jquery.validationEngine-zh_TW.js index 84f22ae..0dc49d2 100644 --- a/js/languages/jquery.validationEngine-zh_TW.js +++ b/js/languages/jquery.validationEngine-zh_TW.js @@ -171,6 +171,10 @@ "alertText2": "可接受的格式: ", "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM 或 ", "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM" + }, + "hexcolor": { + "regex": /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, + "alertText": "* Invalid color" } };