Commit 6f0ad156 by 梁建民

限制长度

parent 919173ff
......@@ -32,7 +32,7 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required">
lay-verify="required|limitLength">
</div>
</div>
<div class="brand input_div ">
......
......@@ -41,7 +41,7 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required">
lay-verify="required|limitLength">
</div>
</div>
<div class="brand input_div ">
......
......@@ -29,7 +29,7 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号"
class="input boxsiz" lay-verify="required">
class="input boxsiz" lay-verify="required|limitLength">
</div>
</div>
<div class="brand input_div ">
......
......@@ -274,6 +274,7 @@
});
}
});
$('.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")) {
......@@ -295,6 +296,14 @@
});
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
return this;
},
}, $(function () {
......
......@@ -194,6 +194,14 @@ $(function () {
});
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
}
};
quotedetail.init();
......
! function () {
!function () {
window.ReleaseInquiry = {
isClick: false,
imgUrl: "",
......@@ -61,7 +61,8 @@
iframe.attachEvent("onload", opt.iframeOnload);
} else {
iframe.onload = opt.iframeOnload;
};
}
;
opt.formSubmit();
$('#mineFiles').on('change', function () {
layer.load(1, {
......@@ -182,6 +183,7 @@
});
}
});
$('.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")) {
......@@ -195,7 +197,18 @@
$('.upload_result img').attr('src', '');
opt.imgUrl = "";
})
});
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
}
}
});
return this;
},
}, $(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