I need to validate lows checkbox with jquery.validate.unobtrusive
and I use this code but always checkbox is valid. How to solve this?
<input id="AcceptLaws" type="checkbox" name="AcceptLaws" data-val="true" data-val-required="Please accept with laws">
<span class="field-validation-valid" data-valmsg-for="AcceptLaws" data-valmsg-replace="true"></span>
$('#AcceptLaws').valid()
Aucun commentaire:
Enregistrer un commentaire