Form Validation in LEAP™ 5
LEAP™ 5 leverages the jQuery Validate Plugin as the default client-side validation library.
The full documentation for this library can be found at: http://docs.jquery.com/Plugins/Validation
To activate form validation:
- Add a class to your form (see line 1).
- Add the validation options to your form elements (see line 6)
- Add the validation trigger script after your form closing tag (see line 12)
<form class="validForm" name="validForm" action="#" onSubmit="return false">
<input
type="text"
name="LEAP_x"
class="LEAP_mod[$ContentID] number"
id="LEAP_x[$ContentID]"
value="0.00"
/>
<script type="text/javascript">
$(document).ready(function(){ $(".validForm").validate() });
</script>