

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
					var if4 = document.getElementById("server").selectedIndex;
      universe=document.getElementById("server").options[if4].text;
     
			$.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":"* Your field is not matching"},		
					"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"},
					"pass":{
						"regex":"/^(?!^[0-9]*$)(?!^[a-zA-Z!@#$%^&*()_+=<>?]*$)^([a-zA-Z!@#$%^&*()_+=<>?0-9]{6,15})$/", 
						"alertText":"* Numbers"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* No special caracters allowed"},	
					"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"unik="+universe,
						"alertTextOk":"* This user is available",	
						"alertTextLoad":"* Loading, please wait",
						"alertText":"* This user is already taken"},	
					"ajaxName":{
						"file":"validateUser.php",
						"alertText":"* This name is already taken",
						"alertTextOk":"* This name is available",	
						"alertTextLoad":"* Checking username, please wait"},

					"ajaxUserEmail":{
						"file":"validateEmail.php",
						"extraData":"name=eric",
						"alertTextOk":"* This Email is available",	
						"alertTextLoad":"* Checking Email, please wait",
						"alertText":"* This Email is already taken"},	
					"ajaxEmail":{
						"file":"validateEmail.php",
						"alertText":"* This Email is Already in Use",
						"alertTextOk":"* This Email is available",	
						"alertTextLoad":"* Checking Email, please wait"},
					"ajaxEmail2":{
						"file":"validateEmail.php",
						"alertText":"* Invalid Email.",
						"alertTextOk":"* Strong email",	
						"alertTextLoad":"* Checking Email"},	
					
					
					"ajaxPass":{
						"file":"validatepass.php",
						"extraData":"uname="+uname,
						"alertText":"* This password is not secure please change your password.",
						"alertTextOk":"* Strong Password",	
						"alertTextLoad":"* Checking Password"},	
					"ajaxPass2":{
						"file":"validatepass.php",
						"extraData":"uname="+uname,
						"alertText":"* User name and password should be different.",
						"alertTextOk":"* Strong Password",	
						"alertTextLoad":"* Checking Password"},	
					"ajaxPass3":{
						"file":"validatepass.php",
						"extraData":"uname="+uname,
						"alertText":"* Password should be greater than 6 characters. .",
						"alertTextOk":"* Strong Password",	
						"alertTextLoad":"* Checking Password"},
					"ajaxPass4":{
						"file":"validatepass.php",
						"extraData":"uname="+uname,
						"alertText":"* Password should be strong.",
						"alertTextOk":"* You have a strong password.",	
						"alertTextLoad":"* Checking Password"},		
					
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* Letters only"},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"* You must have a firstname and a lastname"},
					"captchafields":{
    					"regex":"none",
						"alertText":"* In Correct Captcha"}		
					}	
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});

