﻿

(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":"*Enter least ",
						"alertText2":" and maximum ",
						"alertText3": " Character"},
					"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]{1,2}\-\[0-9]{1,2}\-\[0-9]{4}$/",
                         "alertText":"* Date not listed, click on the box and select the date"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* Numbers only"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* No special caracters 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"},
					"onlyData":{
						"regex":"/^[a-zA-Z]{1,2}\-\[a-zA-Z]{1,2}\-\[a-zA-Z]{4}$/",
						"alertText":"* Only date"},
					"validateAir":{
    					"nname":"validateAir",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
						"noAir":{
    					"nname":"noAir",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
						"noAir2":{
    					"nname":"noAir2",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
						"noAir2p":{
    					"nname":"noAir2p",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
						"noAir3":{
    					"nname":"noAir3",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
						"noAir3p":{
    					"nname":"noAir3p",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
					"validateData":{
    					"nname":"validateData",
    					"alertText":"* This no airport in the database, please choose the list use the arrow to the right"},
					"validatePipl":{
    					"nname":"validatePipl",
    					"alertText":"* - Infants and children may not travel alone. Should be associated with an adult traveler. - Only one infant per adult passenger."},
						"ludi":{
    					"nname":"ludi",
    					"alertText":"* - Infants and children may not travel alone. Should be associated with an adult traveler. - Only one infant per adult passenger."},
					"hotelsDat":{
    					"nname":"hotelsDat",
    					"alertText":"* Date instructions are not true, the date of departure not the date of arrival dolzhnasovpodat, the minimum stay at the hotel 24 hours, click on the box and select a date."},
					"validateHotels":{
    					"nname":"validateHotels",
    					"alertText":"* Enter city name"},
					"hotelsGuests":{
    					"nname":"hotelsGuests",
    					"alertText":"* Make a choice with fewer. Maximum number - one number per person."},
					"hotelsNumb":{
    					"nname":"hotelsNumb",
    					"alertText":"* Date instructions are not true, the maximum booking of 30 days."},
					"autoMinDat":{
    					"nname":"autoMinDat",
    					"alertText":"* Date instructions are not true, the date of start of rental locations not dolzhnasovpodat with the date of return location, the minimum lease time 24 hours, click on the box and select a date."},
					"autoYear":{
    					"nname":"autoYear",
    					"alertText":"* You are not allowed to drive a car, your vozras must be at least 18 years."}
					}	
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});