

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{"required":{  
			  			// Add your regex rules here, you can take telephone as an example
						
					 "disputente":{
						 "nname":"disputente",
						 "alertText":"* You must have a firstname and a lastname"},
					"regex":"none",
						"alertText":"* Campo richiesto",
						"alertTextCheckboxMultiple":"* Selezionare un opzione",
						"alertTextCheckboxe":"* Checkbox richiesto"},
					"length":{
						"regex":"none",
						"alertText":"* Min ",
						"alertText2":" Max ",
						"alertText3": " caratteri"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* Checks allowed Exceeded"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* Selezionare min. ",
						"alertText2":" opzione"},	
					"confirm":{
						"regex":"none",
						"alertText":"* I campi non coincidono"},		
					"telephone":{
						"regex":"/^[0-9\-\(\)\ ]+$/",
						"alertText":"* Numero di telefono non valido"},	
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+\.[a-zA-Z0-9]{2,4}$/",
						"alertText":"* Indirizzo email non valido"},	
					"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":"* Solo numeri"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* Caratteri speciali non consentiti"},	
					"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"name=eric",
						"alertTextOk":"* Nome utente disponibile",	
						"alertTextLoad":"* Caricamento, attendere prego",
						"alertText":"* Nome utente non disponibile"},	
					"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":"* Solo lettere consentite"},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"* You must have a firstname and a lastname"}	
					}	
					
		}
	}
})(jQuery);

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