表单验证优化
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公告标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text">
|
||||
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -81,11 +81,7 @@
|
||||
}
|
||||
|
||||
$("#form-notice-add").validate({
|
||||
rules:{
|
||||
noticeTitle:{
|
||||
required:true,
|
||||
}
|
||||
}
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
|
Reference in New Issue
Block a user