user2063758
user2063758

Reputation: 11

TypeError: $(...).valid is not a function in jquery validation

The below code is working fine on standalone but throwing javascript error when jsp is deployed on the server.I have included jquery.validation.js for .valid method.

 if (jQuery("input[name=uname]").valid()& jQuery("input[name=add]").valid() & jQuery("input[name=cty]").valid()& jQuery("input[name=stat]").valid()& jQuery("input[name=zip]").valid()& jQuery("input[name=ssn]").valid()& (jQuery('#Terms_Cond').is(":checked"))) 

Upvotes: 0

Views: 4292

Answers (1)

Edwin Alex
Edwin Alex

Reputation: 5108

Change & to &&, then try.

if (jQuery("input[name=uname]").valid()&& jQuery("input[name=add]").valid() && jQuery("input[name=cty]").valid()&& jQuery("input[name=stat]").valid()&& jQuery("input[name=zip]").valid()&& jQuery("input[name=ssn]").valid()&& (jQuery('#Terms_Cond').is(":checked")))

Upvotes: 1

Related Questions