I have this form in my app and I will submit it via AJAX, but I want to use HTML5 for client-side validation. So I want to be able to force the form validation, via normal HTML field.
I want to trigger the validation without submitting the form. Is it possible?
HTML Code Example
<form id="frm" class="form-horizontal form-label-left">
<div class="col-md-6 col-sm-6 col-xs-12">
<input id="name" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="name" placeholder="both name(s) e.g Jon Doe" required="required" type="text">
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<button id="send" type="button" class="btn btn-success" onclick="saveForm()">Submit</button>
</div>
</div>
</form>
<hr />
<button id="checkValidity">Check Validity</button>