Showing
1 changed file
with
1 additions
and
1 deletions
@@ -260,7 +260,7 @@ edit.prototype={ | @@ -260,7 +260,7 @@ edit.prototype={ | ||
260 | var value =$.trim($(this).val()); | 260 | var value =$.trim($(this).val()); |
261 | var name=$(this).attr("placeholder")&&!(/^\d+$/.test($(this).attr("placeholder")))?$(this).attr("placeholder").replace(/请填写/g,''):$(this).parents(".form-group").find("label").text().replace(/\*/g,''); | 261 | var name=$(this).attr("placeholder")&&!(/^\d+$/.test($(this).attr("placeholder")))?$(this).attr("placeholder").replace(/请填写/g,''):$(this).parents(".form-group").find("label").text().replace(/\*/g,''); |
262 | 262 | ||
263 | - if (id&&$(this).attr("required")&&+value==-1) { | 263 | + if (id&&$(this).attr("required")&&(+value==-1||+value=="")) { |
264 | err.push("<p>请选择 "+name+"</p>"); | 264 | err.push("<p>请选择 "+name+"</p>"); |
265 | } | 265 | } |
266 | }); | 266 | }); |
-
Please register or login to post a comment