Help with Bassistance Validation Plugin.
Hi,
<div>
<label for="AddressLine2" class="overlabel">Address Line 2</label>
<input id="AddressLine2" name="AddressLine2" class="textInput" />
</div>
<div>
<label for="Suburb" class="overlabel">Suburb</label>
<input id="Suburb" name="Suburb" class="textInput required" />
</div>
The javascript in the header is simply:
<!-- form validation scripts (for contact page) -->
<script src="js/jquery.validate.min.js" type="text/javascript"></script>
<script type="text/javascript">
// initialize form validation
$(document).ready(function() {
$("#CommentForm").validate();
});
</script>
I am having problems finding clear documentation on how to make a form required while maintaining this soft of structure, instead of having all the rules seperately in the javascript.
I have a Date of Birth field, ideally I would like it to be able to tell if they are over 18 based on that, and make the fields for their guardians details required if they are. Any feedback on how to add the call back dependencies as part of each input element would be greatly appreciated, and how to decipher a date so that it tells me if they will be 18 by another specific date would be greatly appreciated!