$('#link').click(function()
{
// call .valid() method for each field
if ($("input[name=name]").valid() && $("input[name=email]").valid())
{
// do some stuff
}
else
{
// just show validation errors, dont post
}
});
Reference:
http://stackoverflow.com/questions/9129029/jquery-validation-onclick
No comments:
Post a Comment