I am trying to use the jQuery validation plugin to validate my form but cant get it working. I have the script types in the header:
<script type="text/javascript" src="/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/jquery.validate.js"></script>
And my Form:
<form id="taskentry" method="post">
Trip Date<input type="text" class="required" name="trip[Date]" id="tripDate" placeholder="MM/DD/YYYY"/></form>
I tried this but not working:
<script>
$("#taskentry").validate({
rules: {
tripDate: {required: true}
}
});
</script>
How do I implement the validation plugin to use on my form?
Thank You