Dhamodaran R
Dhamodaran R

Reputation: 21

How to call jquery validation from javascript?

I ve placed a small validation in a javascript function . Now i need to call jquery validation from javascript function .. how can i call the jquery validation from javascript ???

Upvotes: 2

Views: 3729

Answers (2)

m0sa
m0sa

Reputation: 10940

You need to call the form() method of the validation plugin

var valid = $('form').validate().form()

Upvotes: 1

ianace
ianace

Reputation: 1635

From the jquery tutorial site

you can do:

$("input[type='text']").change( function() {
    // check input ($(this).val()) for validity here
});

if you want to validate text inputs

Upvotes: 1

Related Questions