So I downloaded the jQuery library and the plug ins library and put this in the head of the html file-
<script src=“jquery-1.4.2.js”></script>
<script type=“text/javascript” src=“jquery.validate.js”></script>
jQuery.validator.setDefaults({
debug: true,
success: “valid”
});;
</script>
<script>
$(document).ready(function(){
$(“#myForm”).validate({
rules: {
field: “required”
}
});
});
</script>
This would be for the required fields validator.
My form id is “myForm” and my fields are set up like this:
<div><label for=“first_name”>First Name<span class=“asterik”>*</span></label>
<input id=“first_name” maxlength=“40” name=“first_name” size=“20” type=“text” tabindex=“2” /></div>
I changed the input name to “required” instead of “first_name” and it didn’t work.
I also changed the input id to “field” and that didn’t work either.
Am I just not doing this correctly?