From 720138943f8baa313b9d49c7390e6055555973fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=B9=BF=E6=B5=A9?= Date: Tue, 18 Aug 2015 17:48:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E8=A1=A8=E7=A4=BA=E6=98=AF=E5=90=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bootstrap3-validation.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bootstrap3-validation.js b/src/bootstrap3-validation.js index 1b0f8b6..a933add 100644 --- a/src/bootstrap3-validation.js +++ b/src/bootstrap3-validation.js @@ -25,10 +25,11 @@ * params.msg = data.msg; * }); * }}, - * {reqmark:false,icon:true} + * {reqmark:false,icon:true,errmsg:true} * ); * 其中: reqmark = true 表示显示*号 * icon = true 表示提示在图标显示, 默认是不显示。 + * errmsg = true 表示显示报错信息 * * * 编号 版本号 作者 修改日期 修改内容 @@ -179,6 +180,7 @@ {name: 'mobile', validate: function(value) {return (!/^0?(13[0-9]|15[0-9]|17[0678]|18[0-9]|14[57])[0-9]{8}$/.test(value));}, defaultMsg: '请输入正确的手机号。'} ], reqmark:true, + errmsg :true, callback:null, //function(obj,params){}; icon:false //=icon=true 表示显示图标,默认不显示 }; @@ -343,6 +345,9 @@ } } };//end !form + if(globalOptions.errmsg!==true ){ + controlGroup.find('.help-block').remove(); + }; return !error; }; @@ -413,4 +418,4 @@ //end 4 }; -}(window.jQuery); \ No newline at end of file +}(window.jQuery);