(function($) { $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { newLang: function() { $.validationEngineLanguage.allRules = { "required":{ "regex":"none", "alertText":"* This field is required", "alertTextCheckboxMultiple":"* Please select an option", "alertTextCheckboxe":"* This checkbox is required" }, "equals":{ "regex":"none", "alertText":"* Incorrect password confirmation" }, "length":{ "regex":"none", "alertText":"* Must be from ", "alertText2":"* to ", "alertText3":"* symbols " }, "maxCheckbox":{ "regex":"none", "alertText":"* Cannot select this amount of variables " }, "minCheckbox":{ "regex":"none", "alertText":"* Please choose ", "alertText2":"* options " }, "confirm":{ "regex":"none", "alertText":"* Input data does not match " }, "date":{ "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/", "alertText":"* Wrong date, must be in YYYY-MM-DD format " }, "onlyNumber":{ "regex":"/^[0-9\ ]+$/", "alertText":"* Only digits " }, "noSpecialCaracters":{ "regex":"/^[0-9a-zA-Z]+$/", "alertText":"* Special characters are forbidden " }, "ajaxUser":{ "url":"validateUser.php", "extraData":"name=eric", "alertTextOk":"* Username is valid ", "alertTextLoad":"* Loading, please wait ", "alertText":"* Such user already exists " }, "ajaxName":{ "url":"https://wiotto.com/frontend/handlers/ajaxValidateRegistrationFields.php", "extraData":"validateLogin", "alertText":"* This name already exits ", "alertTextOk":"* This name is valid ", "alertTextLoad":"* Loading, please wait " }, "ajaxEmail":{ "url":"https://wiotto.com/frontend/handlers/ajaxValidateRegistrationFields.php", "extraData":"validateEmail", "alertText":"* This email address belongs to an existing profile! ", "alertTextOk":"* This email address is valid ", "alertTextLoad":"* Loading, please wait " }, "onlyLetter":{ "regex":"/^[a-zA-Z\ ']+$/", "alertText":"* Only letters " }, "validate2fields":{ "nname":"validate2fields", "alertText":"* Please enter you first and last name " }, "phoneNumberFormat":{ "regex":/^(\+?\d+)?\s*(\(\d+\))?[\s-]*([\d-]*)$/, "alertText":"* Invalid phone number " }, "emailFormat":{ "regex":/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,6})$/, "alertText":"* Invalid email address " }, "urlFormat":{ "regex":/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\|\\^\[\]`]+)?$/, "alertText":"* Invalid URL " } } } } })(jQuery); jQuery(document).ready(function($) { $.validationEngineLanguage.newLang() });