@@ -18,15 +18,15 @@ particular form.
18
18
<form action =" " onsubmit =" return $(this).validate();" >
19
19
<p >
20
20
Name (4 characters minimum):
21
- <input name =" user" data-validation =" validate_min_length length4" />
21
+ <input name =" user" data-validation =" min_length length4" />
22
22
</p >
23
23
<p >
24
24
Birthdate (yyyy-mm-dd):
25
- <input name =" birth" data-validation =" validate_birthdate " />
25
+ <input name =" birth" data-validation =" birthdate " />
26
26
</p >
27
27
<p >
28
28
Website:
29
- <input name =" website" data-validation =" validate_url " />
29
+ <input name =" website" data-validation =" url " />
30
30
</p >
31
31
<p >
32
32
<input type =" submit" />
@@ -35,6 +35,15 @@ particular form.
35
35
...
36
36
```
37
37
38
+ ### Moving up to version 2.0
39
+
40
+ So what has changed since version 1.x?
41
+
42
+ * A whole bunch of validation functions have been added (see below)
43
+ * A modular design have been introduced, which means that some validation functions is default and others is part of a module
44
+ * You no longer need to prefix the validation rules with "validate_ "
45
+
46
+
38
47
### Default validators (no module needed)
39
48
* ** validate_url**
40
49
* ** validate_email**
@@ -363,4 +372,4 @@ $_SESSION['captcha'] = array( mt_rand(0,9), mt_rand(1, 9) );
363
372
[ Matt Clements] ( https://github.com/mattclements ) (contributor)<br />
364
373
[ dfcplc] ( https://github.com/dfcplc ) (contributor)<br />
365
374
[ Darren Mason] ( http://www.mypocket-technologies.com ) (Password strength meter)<br />
366
- [ Scott Gonzales] ( http://projects.scottsplayground.com/iri/ ) (URL regexp)
375
+ [ Scott Gonzales] ( http://projects.scottsplayground.com/iri/ ) (URL regexp)
0 commit comments