Emulate ASP.NET validation groups with jQuery validation

Updated 1 week, 6 days ago

Source: http://encosia.com/

In my most recent post, I demonstrated a workaround to allow using the jQuery validation plugin with WebForms pages. The basic idea was to trigger validation only on submissions that occurred within a single logical form, instead of catching submissions anywhere on WebForms’ all-encompassing physical form.

This approach worked fine for a single logical form, but wasn’t robust enough when handling validation for multiple logical forms on a single page. Additionally, it did not properly ...

  • 28 comments on this story
PRO

50% positive

Showing 7 relevant reactions out of 28.

@lukeamarsh Something like http://encosia.com/939 and http://encosia.com/948 ?

1 week, 6 days ago by Encosia on Twitter

@mosessaur Make sure you see the followup too: http://encosia.com/948

2 months, 2 weeks ago by Encosia on Twitter

Using jQuery for far cleaner client side validation than the standard ASP.Net controls http://bit.ly/6KjQuX

3 months, 1 week ago by robmarsd on Twitter

That’s a great point; thanks for the comment.

My solution was to use .parents(’.validationGroup:first’), but .closest(’.validationGroup’) is more concise and readable both.

3 months, 3 weeks ago by Dave Ward on Wordpress

Social comments and analytics for this post…

This post was mentioned on Twitter by Encosia: Blogged (finally): Emulate ASP.NET validation groups with jQuery validation http://encosia.com/948…

3 months, 3 weeks ago by uberVU - social comments on Wordpress

Emulate ASP.NET validation groups with jQuery validation: In my most recent post, I demonstrated a workaround t.. http://bit.ly/8sAHNn

3 months, 3 weeks ago by allwebdev on Twitter

To fix the first issue, you should be able to use the closest function in place of the parents function.

3 months, 3 weeks ago by Brian Dukes on Wordpress

© uberVU Ltd. 2010

Terms of use
FEEDBACK