(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":"* This field is required", "alertTextCheckboxMultiple":"* Please select an option", "alertTextCheckboxe":"* This checkbox is required"}, "length":{ "regex":"none", "alertText":"*Between ", "alertText2":" and ", "alertText3": " characters allowed"}, "maxCheckbox":{ "regex":"none", "alertText":"* Checks allowed Exceeded"}, "minCheckbox":{ "regex":"none", "alertText":"* Please select ", "alertText2":" options"}, "confirm":{ "regex":"none", "alertText":"* These fields must match"}, "telephone":{ "regex":"/^[0-9\-\(\)\ ]+$/", "alertText":"* Invalid phone number"}, "email":{ "regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/", "alertText":"* Invalid email address"}, "date":{ "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/", "alertText":"* Invalid date, must be in YYYY-MM-DD format"}, "onlyNumber":{ "regex":"/^[0-9\ ]+$/", "alertText":"* Numbers only"}, "noSpecialCaracters":{ "regex":"/^[0-9a-zA-Z]+$/", "alertText":"* No special characters allowed"}, "ajaxReferralCode":{ "file":"/account/validate/edit", "alertTextOk":"* This referral code is available", "alertTextLoad":"* Checking ... please wait", "alertText":"* This referral code is already taken"}, "ajaxParentReferralCode":{ "file":"/account/validate/signup", "alertTextOk":"* This referral code is valid", "alertTextLoad":"* Checking ... please wait", "alertText":"* This referral code does not match an existing member"}, "ajaxCheckUserName":{ "file":"/account/validate/edit", "alertTextOk":"* This email is now your login name", "alertText":"* This email address is already taken", "alertTextLoad":"* Checking ... please wait"}, "onlyLetter":{ "regex":"/^[a-zA-Z\ \']+$/", "alertText":"* Letters only"}, "validStoreList":{ "nname":"validStoreList", "alertText":"Please select a Store"} }; } }; })(jQuery); $(document).ready(function() { $.validationEngineLanguage.newLang(); });