(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": "* 此栏为必填项 ",
                    "alertTextCheckboxMultiple": "* 请选择一个选项 ",
                    "alertTextCheckboxe": "* 此选择框为必选 "
                },
                "minSize": {
                    "regex": "none",
                    "alertText": "* 最少 ",
                    "alertText2": " 个字符 "
                },
                "maxSize": {
                    "regex": "none",
                    "alertText": "* 最多 ",
                    "alertText2": " 个字符 "
                },
                "min": {
                    "regex": "none",
                    "alertText": "* 最小值是 "
                },
                "max": {
                    "regex": "none",
                    "alertText": "* 最大值是 "
                },
                "past": {
                    "regex": "none",
                    "alertText": "* 在此日期后 "
                },
                "future": {
                    "regex": "none",
                    "alertText": "* 在此日期前 "
                },	
                "maxCheckbox": {
                    "regex": "none",
                    "alertText": "* 最多选择 ",
                    "alertText2": " 个项"
                },
                "minCheckbox": {
                    "regex": "none",
                    "alertText": "* 最少选择 ",
                    "alertText2": " 个项"
                },
                "equals": {
                    "regex": "none",
                    "alertText": "* 两次输入不一致 "
                },
                "phone": {
                    // credit: jquery.h5validate.js / orefalo
                    "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
                    "alertText": "* 无效电话号码 "
                },
				"telephone":{
						//"regex":"/^[0-9\-\(\)\ ]+$/",
						"regex":/^\d{3}-\d{8}|\d{4}-\d{7}|\d{8}|\d{7}$/,
						"alertText":"* 您输入的电话号码格式有误"
				},	
				"mobilenumber":{
						"regex":/^1[358]\d{9}$|^1060[1-9]\d{1,2}\d{7,8}$/,
						"alertText":"* 您输入的手机号码格式有误"
				},
                "email": {
                 
                    "regex": /^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/,
                    "alertText": "* 无效电子邮箱 "
                },
                "integer": {
                    "regex": /^[\-\+]?\d+$/,
                    "alertText": "* 不是一个合法的整数 "
                },
                "number": {
                    // Number, including positive, negative, and floating decimal. credit: orefalo
                    "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
                    "alertText": "* 无效的带有小数的数字 "
                },
                "date": {
                    "regex": /^([1-2]\d{3})[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
                    "alertText": "* 无效日期，日期格式为：YYYY-MM-DD "
                },
                "ipv4": {
                    "regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
                    "alertText": "* 无效IP地址 "
                },
                "url": {
                    "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
                    "alertText": "* 网址应为：http://xx "
                },
                "onlyNumberSp": {
                    "regex": /^[0-9\ ]+$/,
                    "alertText": "* 只能输入数字 "
                },
                "onlyLetterSp": {
                    "regex": /^[a-zA-Z\ \']+$/,
                    "alertText": "* 只能输入字母 "
                },
                "onlyLetterNumber": {
                    "regex": /^[0-9a-zA-Z]+$/,
                    "alertText": "* 请去掉特殊字符，重新输入 "
                },
				"userName":{	//用来用户注册。匹配由数字、26个英文字母或者下划线组成的字符串
					"regex":/^[A-Za-z0-9+]+[A-Za-z0-9\.?\_\-+]*@?([A-Za-z0-9\-]+\.?)+[A-Za-z0-9]+$/,
					"alertText": "* 可输入数字、英文及下划线 "
				},
				"userPwd":{	//用户密码。匹配由数字、26个英文字母.下划线组成的字符串
					"regex":/^[A-Za-z0-9\.+\_+]+$/,
					"alertText": "* 输入的格式不正确 "
				},
                // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
                "ajaxUserCall": {
                    "url": "ajaxValidateFieldUser",
                    // you may want to pass extra data on the ajax call
                    "extraData": "name=eric",
                    "alertText": "* 该用户名被占用 ",
                    "alertTextLoad": "* 验证中，请稍后…… "
                },
                "ajaxUserCallAspx": {
                    "url": "/Page/Front/Ajax.aspx",
                    // you may want to pass extra data on the ajax call
                    "extraField": "userName",
                    "extraAndField": "action=ExistUser",
                    //"extraData": "type=0",
                    "successValue": "0",
                    "falseValue": "1",
                    "alertTextOk": "* 该用户名可用 ",
                    "alertText": "* 该用户名被占用 ",
                    "alertTextLoad": "* 验证中，请稍后…… "
                },
                "ajaxEmail": {
                    "url": "/Page/Front/Ajax.aspx",
                    "extraField": "email",
                    "extraAndField": "action=ExistEmail",
                    "successValue": "0",
                    "falseValue": "1",
                    "alertTextOk": "* 该邮箱可用 ",
                    "alertText": "* 该邮箱被占用 ",
                    "alertTextLoad": "* 验证中，请稍后…… "
                },
				 "ajaxNameCallPhp": {
	                    // remote json service location
	                    "url": "",
	                    // error
	                    "alertText": "* 该用户名被占用 ",
	                    // speaks by itself
	                    "alertTextLoad": "* 验证中，请稍后…… "
	                },
                "validate2fields": {
                    "alertText": "* Please input HELLO"
                }
            };
            
        }
    };
    $.validationEngineLanguage.newLang();
})(jQuery);
