Skip to content Skip to sidebar Skip to footer

Jquery Validation Plugin Not Functioning

I can't seem to figure out what the issue is here. I've tried putting my js in my head, below my form, above my form, etc. None of them seem to do anything. It just submits the pag

Solution 1:

you need name attributes on the input fields eg

<inputid="pet_name" name="pet_name"type="text" />

Solution 2:

It seems that you have not added any classes to your elements or done any additional javascript method calls on the plug-in in order to specify the validation behavior.

Typically you would add classes such as required, email, url, etc. to determine the validation behavior (or alternatively call plug-in methods to do the same.

Solution 3:

I havent seen your head, buit be sure to include the following

$(function(){
$("#test").validate();
})

jQuery.validator.setDefaults({
debug: true,
success: "valid",
submitHandler: function(form) { posting(); }

});

You may not need the submit hander, the "posting" part is where you turn your ajax script into a function and call it with the handler. Of course you will need script tags around that

Post a Comment for "Jquery Validation Plugin Not Functioning"