user242315
user242315

Reputation:

JQuery Validate Input with certain class

I'm trying to validate input fields when the value is empty. I want to only target input fields using a certain class. I have tried to use .hasClass("required") without any success.

I hope somebody can help.

EDIT = Should of pasted the rest.

Upvotes: 0

Views: 287

Answers (1)

Alex
Alex

Reputation: 35409

from:

$('input').each(function() {

to:

$('input.yourclassname').each(function() {

Upvotes: 1

Related Questions