

(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 atleast",
						"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":"/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/",
					    "alertText":"* Invalid date, must be in YYYY-MM-DD format"},
					"dateNZ":{
					    "regex":"/^[0-9]{1,2}[\/][0-9]{1,2}[\/][0-9]{4}$/",
					    "alertText":"* Invalid date, must be in dd/mm/yyyy format"},
					"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"},
					"insurance_inforce_commencedate": {
					    "nname": "insurance_inforce_commencedate",
					    "alertText": "* Please enter a commencement date for the policy"},
					"loanapp_validatephonec1":{
					    "nname": "loanapp_validatephonec1",
					    "alertText": "* Please enter at least 1 phone number"},
					"loanapp_validatephonec2": {
					    "nname": "loanapp_validatephonec1",
					    "alertText": "* Please enter at least 1 phone number"},
					"loanapp_checklist_signed": {
					    "nname": "loanapp_checklist_signed",
					    "alertText": "* Completed and Signed Loan Application Form is mandotory"},   
					"loanapp_addresstime_c1": {
					    "nname": "loanapp_addresstime_c1",
					    "alertText": "* This field is required"},    
					"loanapp_addresstime_c2": {
					    "nname": "loanapp_addresstime_c2",
					    "alertText": "* This field is required"},    
					"loanapp_addresstime_c1previous": {
					    "nname": "loanapp_addresstime_c1previous",
					    "alertText": "* This field is required"},    
					"loanapp_addresstime_c2previous": {
					    "nname": "loanapp_addresstime_c2previous",
					    "alertText": "* This field is required"},
					"loanapp_incomelength_c1": {
					    "nname": "loanapp_incomelength_c1",
					    "alertText": "* This field is required"},
					"loanapp_incomelength1_c1": {
					    "nname": "loanapp_incomelength1_c1",
					    "alertText": "* This field is required"},
					"loanapp_incomelength2_c1": {
					    "nname": "loanapp_incomelength2_c1",
					    "alertText": "* This field is required"},
					"loanapp_incomelength_c2": {
					    "nname": "loanapp_incomelength_c2",
					    "alertText": "* This field is required"},
					"loanapp_incomelength1_c2": {
					    "nname": "loanapp_incomelength1_c2",
					    "alertText": "* This field is required"},
					"loanapp_incomelength2_c2": {
					    "nname": "loanapp_incomelength2_c2",
					    "alertText": "* This field is required"},
					"loanapp_checklist_comment": {
					    "nname": "loanapp_checklist_comment",
					    "alertText": "* This field is required"},
					"loanapp_otherprovidername": {
					    "nname": "loanapp_otherprovidername",
					    "alertText": "* This field is required"},
					"Process_InsuranceQuote_dob1": {
					    "nname": "Process_InsuranceQuote_dob1",
					    "alertText":"* Invalid date, must be in dd/mm/yyyy format"},
					"Process_InsuranceQuote_dob2": {
					    "nname": "Process_InsuranceQuote_dob2",
					    "alertText":"* Invalid date, must be in dd/mm/yyyy format"},
					"NeedsAnalysis_dob1": {
					    "nname": "NeedsAnalysis_dob1",
					    "alertText":"* Invalid date, must be in dd/mm/yyyy format"},
					"NeedsAnalysis_dob2": {
					    "nname": "NeedsAnalysis_dob2",
					    "alertText":"* Invalid date, must be in dd/mm/yyyy format"},
					"needsanalysis_occupation1": {
					    "nname": "NeedsAnalysis_occupation1required",
					    "alertText": "* Your occupation is not recognised. Please choose occupation from suggestion list or choose your occupation class."},
					"needsanalysis_occupation2": {
					    "nname": "NeedsAnalysis_occupation2required",
					    "alertText": "* Your occupation is not recognised. Please choose occupation from suggestion list or choose your occupation class."},
					"validate_MaxBorrowingCalc_Deposit": {
					    "nname": "validate_MaxBorrowingCalc_Deposit",
					    "alertText": "* Deposit / Equity must be greater than 0."}
					}
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});
