jQuery validation plugin - removing elements

Posted by d3020 on Stack Overflow See other posts from Stack Overflow or by d3020
Published on 2010-03-17T17:55:28Z Indexed on 2010/03/20 0:41 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

I'm using the jQuery validation plugin. On most of my input type... tags I have class='required'.

When I submit the page, via JavaScript, the controls on the page that have this class are found. However, there are a handful of checkboxes that I don't need to validate.

I've tried removing the class code completely from the input tag, also tried class='cancel', and class='required:false.

When doing any of those things though when the form submits it can't find the checkbox control.

How do I still keep the ability to do Request.Form and find my checkbox object but at the same time when the form submits don't apply validation to this particular control.

Thank you.


Edit here.

This is what I'm using without the "checked" code and ternary operator. In my input tag I'm calling a function like this...

sb.Append(" " + crlf);

Inside that function is where I check for the True or False coming back, like this.

case "chkFlashedCarton": strResultValue = pst.FlashedCarton.ToString(); if (strResultValue == "True") { strResultValue = " checked"; } break;

strResultValue is what is returned back.

Does this help to see? Thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about validation