

(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":"*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]{3}[)][ ][0-9]{3}[-][0-9]{4}$/",
						"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][1-9]|[1-2][0-9]|[3][0-1])[/]([0][1-9]|[1][0-2])[/]([0-9]){4}$/",
                         "alertText":"* Invalid date, must be in MM/DD/YYYY format"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* Numbers only"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* No special caracters allowed"},	
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \'\,\.]+$/",
						"alertText":"* Letters only"},
					"sortCode":{
                        "regex":"/^[0-9]{2}-[0-9]{2}-[0-9]{2}$/",
						"alertText":"* The sort code it's not valid"},
					"ssn":{
                        "regex":"/^[0-9]{3}-[0-9]{2}-[0-9]{4}$/",
						"alertText":"* The social security number it's not valid"},
					"license":{
                        "regex":"/^[ ]*[a-zA-Z0-9]{5,40}[ ]*$/",
						"alertText":"* The license it's not valid"},
                    "cfemail":{
                        "command": "StatusMail",
                        "param": "mail",
                        "alertText": "* The email is invalid"},
					"cfzip":{
    					"command":"StatusZip",
                        "param": "zip",
                        "alertText": "* The zip code is invalid"},
                    "fNIN":{
                        "params": {},
                        "alertText": "* The National Insurance Number it's not valid"},
                    "fcity":{
                        "params": {},
                        "alertText": "* The city doesn't match the zip code"},
                    "fstate":{
                        "params": {},
                        "alertText": "* The state doesn't match the zip code"},
                    "fmobilePhone":{
                        "param": {},
                        "alertText": "* The phone number it's not valid"},
                    "fpostcode":{
                        "param": {},
                        "alertText": "* The postal code it's not valid"},
                    "fworkPhoneUk":{
                        "param": {},
                        "alertText": "* The phone number it's not valid"},
                    "fref1PhoneNumberUk":{
                        "param": {},
                        "alertText": "* The phone number it's not valid"},
                    "fhomePhoneUk":{
                        "param": {},
                        "alertText": "* The phone number it's not valid"},
                    "cfhomePhone":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The phone code number it's not valid"},
                    "cfcellPhone":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The cell phone code number it's not valid"},
                    "cfempPhone":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The employer phone code number it's not valid"},
					"cfEmployerZip":{
    					"command":"StatusZip",
                        "param": "zip",
                        "alertText": "* The employer zip code is invalid"},
                    "fEmployerCity":{
                        "params": {},
                        "alertText": "* The employer city doesn't match the employer zip code"},
                    "fEmployerState":{
                        "params": {},
                        "alertText": "* The employer state doesn't match the employer zip code"},
                    "floanAmount":{
                        "params": {},
                        "alertText": "* The loan amount is required"},
                    "fcalculateIncome":{
                        "params": {},
                        "alertText": "* The last check pay is required"},
                    "fincome":{
                        "params": {},
                        "alertText": "* The income is required"},
                    "fcarValue":{
                        "params": {},
                        "alertText": "* The car value is required"},
                    "funsecuredDebt":{
                        "params": {},
                        "alertText": "* The unsecured debt is required"},
                    "fpayDate1":{
                        "params": {},
                        "alertText": "* The pay date can't be before today."},
                    "fpayDate2":{
                        "params": {},
                        "alertText": "* The pay date doesn't match the pay frequency"},
                    "cfbankPhone":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The bank phone code number it's not valid"},
                    "faba":{
                        "params": {},
                        "alertText": "* Invalid ABA number"},
					"cfaba":{
    					"command":"StatusAba",
                        "param": "aba",
                        "alertText": "* The aba number was not found."},
                    "fSSN":{
                        "params": {},
                        "alertText": "* This social security number it's not valid"},
                    "cfref1PhoneNumber":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The phone code number it's not valid"},
                    "cfref2PhoneNumber":{
                        "command": "StatusPhoneCode",
                        "param": "code",
                        "alertText": "* The phone code number it's not valid"},
                    "fresYears":{
                        "params": {},
                        "alertText": "* The residence time can't be zero."},
                    "fresMonths":{
                        "params": {},
                        "alertText": "* The residence time can't be zero."},
                    "fempYears":{
                        "params": {},
                        "alertText": "* The employment time can't be zero."},
                    "fempMonths":{
                        "params": {},
                        "alertText": "* The employment time can't be zero."},
                    "nullRule" : { }
					}	
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});

