[% # contains app_url so needs to be .tt not linked js file %]
<!-- BEGIN site/js/validationEngine.tt -->

<script src="/js/jquery.validationEngine-en.js" type="text/javascript"></script>
<script src="/js/jquery.validationEngine.js" type="text/javascript"></script>
<script type="text/javascript">
(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{ // Add your regex rules here, you can take telephone as an example
				"required":{    			
					"regex":"none",
					"alertText":"required field",
					"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\-\(\)\ ]+$/",
					"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]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                        "alertText":"* Invalid date, must be in YYYY-MM-DD format",
                },
				"onlyNumber":{
					"regex":"/^[0-9]+$/",
					"alertText":"* integers only",
                },	
				"noSpecialCaracters":{
					"regex":"/^[0-9a-zA-Z]+$/",
					"alertText":"* No special characters allowed",
                },	
				"onlyLetter":{
					"regex":"/^[a-zA-Z\ \']+$/",
					"alertTextOk":"* OK",
					"alertText":"* Letters only",
                },
				"validate2fields":{
    				"nname":"validate2fields",
    				"alertText":"* You must have a firstname and a lastname",
                },
				"ajaxDate":{
                    // ajax validation of dates temp disabled - DatePicker interferes
                    // "file":"[% app_url %]/ajax/jquery_dummy_pass", # now fixed ?
					"file":"[% app_url %]/ajax/jquery_check_value",
					"alertTextLoad":"loading please wait",
					// "alertTextOk":"date OK",
					"alertText":"invalid date"
                },
				"ajaxPostCode":{
					"file":"[% app_url %]/ajax/jquery_check_value",
					"alertTextLoad":"loading please wait",
					// "alertTextOk":"validates OK",
					"alertText":"invalid"
                },
				"onlyDecimal":{
					"regex":"/^[0-9]+\.[0-9]+$/",
					"alertText":"* decimals only",
                },	
				"ajaxRange":{
                    "file":"[% app_url %]/ajax/jquery_within_range",
 					"alertTextLoad":"loading please wait",
					// "alertTextOk":"validates OK",
       				"alertText":"value out of range",
                },
			}	
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});
</script>
<!-- END site/js/validationEngine.tt -->
