jquery ui - Bootstrap validation is not working? -
i have form open in new mode , in edit mode in jquery ui popup validation works me when form open in new mode when same form open in edit mode validation not works stuck here , can't figure out way out. help??
frmspecialtydetail form:
<div id="specialtydetail"> <div class="fadeoutpatch0"></div> <div class="fadeoutbackground" id="fbspecialtydetail"></div> <div id="tblspecialtydetail" class="col-md-12"> <form method="post" id="frmspecialtydetail" onsubmit="return false"> <!--start - contents--> <div class="form-group"> <div class="col-md-6"> <label class="control-label">short name <span class="required">*</span></label> <input class="form-control size100" name="shortname" id="txtshortname" type="text" maxlength="10" /> </div> <div class="col-md-4 pad-a-labelsize"> <div class="checkbox-custom checkbox-default"> <input type="checkbox" checked="" id="chkactive"> <label for="active">active</label> </div> </div> <div class="col-md-12"> <label class="control-label">description</label> <input class="form-control" id="txtdescription" type="text" maxlength="55" /> </div> </div> <div class="col-md-6 pad-a-labelsize-btn"> <div class="btn-block"> <button class="btn btn-primary btn-sm" type="submit">save</button> <!--<button class="btn btn-primary btn-sm" type="reset" onclick="specialtydetail.specialtyunload();">cancel</button>--> </div> </div> </form> </div>
<script type="text/javascript"> $(document).ready(function () { $('#frmspecialtydetail') .bootstrapvalidator({ message: 'this value not valid', feedbackicons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { shortname: { group: '.col-md-6', validators: { notempty: { message: 'short name required' } } } } }) .on('success.form.bv', function (e) { e.preventdefault(); specialtydetail.specialtysave(); }); }); </script>
download boostrap validator , implement code..
here documentation
Comments
Post a Comment