

(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":"* Campo richiesto",
						"alertTextCheckboxMultiple":"* Selezionare un'opzione",
						"alertTextCheckboxe":"* Checkbox richiesto"},
					"length":{
						"regex":"none",
						"alertText":"*Tra ",
						"alertText2":" e ",
						"alertText3": " caratteri consentiti"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* Checks allowed Exceeded"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* Selezionare ",
						"alertText2":" opzioni"},	
					"confirm":{
						"regex":"none",
						"alertText":"* Il tuo campo non corrisponde"},		
					"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":"* Data non valida, formato valido: YYYY-MM-DD"},
					"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":"* Questo user è disponibile",	
						"alertTextLoad":"* Caricamento, attendere...",
						"alertText":"* Questo user è già presente"},	
					"ajaxName":{
						"file":"validateUser.php",
						"alertText":"* Questo nome esiste già",
						"alertTextOk":"* Questo nome è disponibile",	
						"alertTextLoad":"* Caricamento, attendere..."},		
					"onlyLetter":{
						"regex":"/^[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\ ]+$/", 
						"alertText":"* Solo lettere"},		
					"onlyUrl":{
						"regex":"/^((http)|(https)|(ftp)|(mms)|(rtsp)):\/\//",
						"alertText":"* Solo url (http, https, ftp, mms, rtsp)"}
					}
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});

