jQuery: The Write Less, Do More JavaScript Library

(validate) Can rules be turned off by setting them to false?

View: New views
2 Messages — Rating Filter:   Alert me  

(validate) Can rules be turned off by setting them to false?

by Mike817 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to use a checkbox to turn a validation rule off or on. The
rules I'm using is:

MyField: {
        required: "#MyCheckbox:unchecked",
        number: "#MyCheckbox:unchecked"
}

The required rule turns off fine, but the number rule stays on.  Is
there anyway to make this work?

Re: (validate) Can rules be turned off by setting them to false?

by Mike817 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

bump

On Nov 3, 11:30 pm, Mike817 <mike...@...> wrote:

> I'm trying to use a checkbox to turn a validation rule off or on. The
> rules I'm using is:
>
> MyField: {
>         required: "#MyCheckbox:unchecked",
>         number: "#MyCheckbox:unchecked"
>
> }
>
> The required rule turns off fine, but the number rule stays on.  Is
> there anyway to make this work?