Skip to content

Commit f382b20

Browse files
author
bbraithwaite
committed
Updated Readme
1 parent 5d5587b commit f382b20

File tree

2 files changed

+28
-90
lines changed

2 files changed

+28
-90
lines changed

README

Lines changed: 0 additions & 81 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
A plug-in that takes the pain out of using JQuery validation with ASP.Net WebForms. Tackles the problem of being restricted to a single Form element when working with multiple validation groups.
1+
#JQuery Validation Groups for WebForms
22

3-
For more information please see: http://www.contentedcoder.com/2012/08/jquery-validation-groups-for-webforms.html
3+
A plug-in that takes the pain out of using JQuery validation with ASP.Net WebForms.
44

5-
**EXAMPLE**
5+
Enables "validation groups" using JQuery Validation with ASP.Net WebForms.
66

7-
Use the following to bind the event:
7+
For more information please see [blog post] (http://www.contentedcoder.com/2012/08/jquery-validation-groups-for-webforms.html).
88

9+
**Get Started**
10+
11+
Replace the validate bind the validate event from:
12+
13+
```javascript
14+
$("#aspForm").validate();
15+
```
16+
17+
To:
18+
19+
```javascript
920
$("#aspForm").validateWebForm();
21+
```
1022

1123
To create a validation group, add the class "form" to the containing element. Add the class "submit" to the element that should validate upon submit. Now these will be validated seperately, even though they are within the same form:
1224

25+
```xml
1326
<fieldset class="form" id="signup">
14-
15-
....
16-
27+
<asp:Textbox ID="uxUsername" runat="server" CssClass="required" />
1728
<asp:Button ID="uxRegister" runat="server" Text="Sign Up" CssClass="submit" />
18-
1929
</fieldset>
30+
```
31+
32+
That's it!
2033

2134
**FULL EXAMPLE**
2235

36+
```xml
2337
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2438
<html xmlns="http://www.w3.org/1999/xhtml">
2539
<head id="Head1" runat="server">
@@ -59,4 +73,9 @@ To create a validation group, add the class "form" to the containing element. Ad
5973
</fieldset>
6074
</form>
6175
</body>
62-
</html>
76+
</html>
77+
```
78+
79+
**Feedback**
80+
81+
This plug-in is being actively maintained. If you see an issue please flag it either vai the blog post or by raising an issue via Github.

0 commit comments

Comments
 (0)