

(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":"Required.",
						"alertTextCheckboxMultiple":"Please select an option.",
						"alertTextCheckboxes":"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":"Fields do not 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, YYYY-MM-DD is the valid format."},
					"duration":{
						"regex":"/^[0-9]{2}:[0-9]{2}$/",
						"alertText":"Invalid duration, mm:ss is the vaild format, for example 03:52."},						 
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"Numbers only."},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"No special characters allowed."},	
					"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"name=eric",
						"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":"Loading, please wait"},		
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"Letters only."},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"You must have a firstname and a lastname."}	
					}	
					
		}
	}
})(jQuery);

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