Is there a reason for this to not work?
other_product_interest: {
required: #product_interest[0]:checked
},
product_interest[] is a list of checkboxes, if user picks 'other' ,
I guess you have to escape that ID: jQuery interprets that as element
with id product_interest and an attribute named '0'.
Jörn
On Wed, Dec 3, 2008 at 5:24 PM, luke adamis [EMAIL PROTECTED] wrote:
Is there a reason for this to not work?
other_product_interest: {
Thanks,
That did it.
Now I have another issue:
these checkboxes must be names like an array:
product_interest[]
but in the rules I can't have this:
product_interest[]: required,
I know I can insert code in HTML:
class=required
but I would rather have it in
See
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29
Jörn
On Wed, Dec 3, 2008 at 6:58 PM, luke adamis [EMAIL PROTECTED] wrote:
Thanks,
That did it.
Now I have another issue:
these checkboxes must be names like an array:
OK
this works:
current_password: {
minlength: 6,
required: {
depends: #new_password:filled
}
Either depends: #countrycode[value=1] or depends: function() {
return $(#countrycode).val() == '1'; }
Jörn
On Tue, Dec 2, 2008 at 8:42 PM, luke adamis [EMAIL PROTECTED] wrote:
OK
this works:
current_password: {
minlength: 6,
Thanks!
I found the page as well:
http://docs.jquery.com/Plugins/Validation/Methods/required#dependency-
expression
I wonder how I could miss this page.
Luke
On Dec 2, 2008, at 2:05 PM, Jörn Zaefferer wrote:
Either depends: #countrycode[value=1] or depends: function() {
return
7 matches
Mail list logo