Commit 6f0ad156 by 梁建民

限制长度

parent 919173ff
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<span class="input_title lineBlock">*型号:</span> <span class="input_title lineBlock">*型号:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz" <input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required"> lay-verify="required|limitLength">
</div> </div>
</div> </div>
<div class="brand input_div "> <div class="brand input_div ">
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<span class="input_title lineBlock">*型号:</span> <span class="input_title lineBlock">*型号:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz" <input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required"> lay-verify="required|limitLength">
</div> </div>
</div> </div>
<div class="brand input_div "> <div class="brand input_div ">
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<span class="input_title lineBlock">*型号:</span> <span class="input_title lineBlock">*型号:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" <input type="text" name="goods_name" placeholder="请输入商品型号"
class="input boxsiz" lay-verify="required"> class="input boxsiz" lay-verify="required|limitLength">
</div> </div>
</div> </div>
<div class="brand input_div "> <div class="brand input_div ">
......
...@@ -274,6 +274,7 @@ ...@@ -274,6 +274,7 @@
}); });
} }
}); });
$('.form_content').on('click', '.deleteicon', function () { $('.form_content').on('click', '.deleteicon', function () {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) { if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
...@@ -295,6 +296,14 @@ ...@@ -295,6 +296,14 @@
}); });
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
return this; return this;
}, },
}, $(function () { }, $(function () {
......
...@@ -194,6 +194,14 @@ $(function () { ...@@ -194,6 +194,14 @@ $(function () {
}); });
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
} }
}; };
quotedetail.init(); quotedetail.init();
......
! function () { !function () {
window.ReleaseInquiry = { window.ReleaseInquiry = {
isClick: false, isClick: false,
imgUrl: "", imgUrl: "",
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
iframe.attachEvent("onload", opt.iframeOnload); iframe.attachEvent("onload", opt.iframeOnload);
} else { } else {
iframe.onload = opt.iframeOnload; iframe.onload = opt.iframeOnload;
}; }
;
opt.formSubmit(); opt.formSubmit();
$('#mineFiles').on('change', function () { $('#mineFiles').on('change', function () {
layer.load(1, { layer.load(1, {
...@@ -182,6 +183,7 @@ ...@@ -182,6 +183,7 @@
}); });
} }
}); });
$('.form_content').on('click', '.deleteicon', function () { $('.form_content').on('click', '.deleteicon', function () {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) { if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
...@@ -195,7 +197,18 @@ ...@@ -195,7 +197,18 @@
$('.upload_result img').attr('src', ''); $('.upload_result img').attr('src', '');
opt.imgUrl = ""; opt.imgUrl = "";
}) });
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
return this; return this;
}, },
}, $(function () { }, $(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment