Just wanted to thank you for posting this - it saved me alot of
time.
I initially mistakenly used the id attribute, but once I used name, it
worked.
Hopefully I can get some testing in and if I find anything worth
mentioning, I'll post back.



On Mar 16, 5:47 pm, Sam <sam.critch...@shivam.com.au> wrote:
> Hi folks,
>
> I couldn't find any solutions to this. I needed the validate plugin to
> havevalidationgrouplike functionality for use on asp.net webforms
> (because asp.net only allows one form).
>
> I'm not much a javascript programmer but I had a crack at it anyway.
> After stumbling in the dark for a bit I have something (that i havent
> tested much) that appears to work. Wasn't as hard as I thought it
> would be :)
>
> The syntax for defining thegrouplike behaviour is:
>
> valgroups : {
>                     test : { buttons : [ '<%= SaveButton.UniqueID
> %>' ], fields : [ '<%= Firstname.UniqueID %>', '<%= Surname.UniqueID
> %>' ] },
>                     foo : { buttons : [ '<%= SaveButton2.UniqueID
> %>' ], fields : ['<%= Company.UniqueID %>', '<%= Postcode.UniqueID
> %>' ] }
>                 },
>
> The absence of the valgroups definition just validates everything. The
> need for a label of the 'groups' is somewhat questionable as I don't
> reference it anywhere. I didn't want to have to add onclick code or
> special attributes to my buttons so I just associate the buttons
> directly with the field subset.
>
> When validating seperate groups the behaviour I've added hides all
> error messages and field highlights for fields in the other groups.
>
> You can view/download the code 
> here:http://plugins.jquery.com/files/issues/jquery.validate.js__0.txt
>
> I'd say it's likely that I've broken something but so far so good.

Reply via email to