Skip to content

Commit f4f1051

Browse files
committed
version release 2.1.0
1 parent 9c21665 commit f4f1051

File tree

10 files changed

+27
-29
lines changed

10 files changed

+27
-29
lines changed

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ particular form.
3232
<script src="js/form-validator/jquery.form-validator.min.js"></script>
3333
<script>
3434
/* important to locate this script AFTER the closing form element, so form object is loaded in DOM before setup is called */
35-
$.setupForm({
35+
$.validationSetup({
3636
modules : 'date, security'
3737
});
3838
</script>
@@ -48,7 +48,7 @@ So what has changed since version 1.x?
4848
* You no longer need to prefix the validation rules with "validate_".
4949
* Error message position now defaults to "element".
5050
* The optional features (validateOnBlur and showHelpOnFocus) is now enabled by default.
51-
* The function $.setupForm(config) is introduced to reduce the amount of code that has to be written when initiating the form validation.
51+
* The function $.validationSetup(config) is introduced to reduce the amount of code that has to be written when initiating the form validation.
5252
* Demos and full documentation is now available at http://formvalidator.net/
5353

5454
### Default validators and features (no module needed)
@@ -144,7 +144,7 @@ that checks if the input contains an even number.
144144
});
145145
146146
// Initiate form validation
147-
$.setupForm();
147+
$.validationSetup();
148148
149149
</script>
150150
```
@@ -251,9 +251,9 @@ var enErrorDialogs = {
251251
groupCheckedTooManyStart : 'Please choose a maximum of ',
252252
groupCheckedRangeStart : 'Please choose between ',
253253
groupCheckedEnd : ' item(s)',
254-
254+
255255
_dummy--last-item-no-comma : 0
256-
256+
257257
};
258258
```
259259

@@ -265,14 +265,14 @@ var enErrorDialogs = {
265265
<script src="js/form-validator/jquery.form-validator.min.js"></script>
266266
<script src="js/form-validator/locale.en.js"></script>
267267
<script>
268-
$.setupForm({
268+
$.validationSetup({
269269
language : enErrorDialogs
270270
});
271271
</script>
272272
...
273273
```
274274

275-
Inline error messages is also possible. If you add attribute `data-validation-error-msg` to an element the value of
275+
It's also possible to add inline error messages. If you add attribute `data-validation-error-msg` to an element the value of
276276
that attribute will be displayed instead of the error dialog that the validation function refers to.
277277

278278
## Input length restriction
@@ -287,14 +287,12 @@ that attribute will be displayed instead of the error dialog that the validation
287287
```
288288

289289
## Program Flow
290-
form submit() event is bound to jQ func **validateForm()**
291-
292-
when the form is submitted, it calls jQ func **$.formUtils.validateInput**, which calls **validatorFunction** for the specific validation rule assigned to the input element
293-
294-
if a validation fails, error messages are assigned and displayed as configured.
295-
296-
297-
if **validateOnBlur** = true, jQ finds all form input elements with the data-validation attribute and binds their onBlur event to call the function **validateInputOnBlur**. it calls jQ func **$.formUtils.validateInput** to validate the single input when blurred
290+
Form submit() event is bound to jQ func **validateForm()** when the form is submitted, it calls
291+
jQ func **$.formUtils.validateInput**, which calls **validatorFunction** for the specific validation
292+
rule assigned to the input element. If a validation fails, error messages are assigned and displayed
293+
as configured. If **validateOnBlur** is set to true, jQ finds all form input elements with the
294+
data-validation attribute and binds their onBlur event to call the function **validateInputOnBlur**.
295+
it calls jQ func **$.formUtils.validateInput** to validate the single input when blurred.
298296

299297

300298
## Changelog
@@ -314,7 +312,7 @@ if **validateOnBlur** = true, jQ finds all form input elements with the data-val
314312
* Length validation now looks at attribute data-validation-length (eg. min5, max200, 3-12).
315313
* The validation rule no longer needs to be prefixed with "validate_" (it's still possible to use the prefix but it's considered deprecated).
316314
* Some validation functions is moved to modules (see the function reference over at http://formvalidator.net).
317-
* Added function $.setupForm() to reduce the amount of code that has to be written when initiating the form validation.
315+
* Added function $.validationSetup() to reduce the amount of code that has to be written when initiating the form validation.
318316

319317

320318
## Credits
@@ -338,5 +336,5 @@ if **validateOnBlur** = true, jQ finds all form input elements with the data-val
338336
#### Additional credits
339337

340338
<a href="http://projects.scottsplayground.com/iri/" target="_blank">Scott Gonzales</a> (URL regexp)<br />
341-
<a href="http://www.mypocket-technologies.com" target="_blank">Darren Mason</a> (Password strength meter)
339+
<a href="http://www.mypocket-technologies.com" target="_blank">Darren Mason</a> (Password strength meter)<br />
342340
<a href="http://stevewasiura.waztech.com" target="_blank">Steve Wasiura</a> (Checkbox group)

form-validator/date.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.0.14
13+
* @version 2.1.0
1414
*/
1515
(function($) {
1616

form-validator/file.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.0.14
13+
* @version 2.1.0
1414
*/
1515
(function($, window) {
1616

form-validator/jquery.form-validator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @website http://formvalidator.net/
77
* @license Dual licensed under the MIT or GPL Version 2 licenses
8-
* @version 2.0.14
8+
* @version 2.1.0
99
*/
1010
(function($) {
1111

@@ -387,7 +387,7 @@
387387
* Short hand function that makes the validation setup require less code
388388
* @param config
389389
*/
390-
$.setupForm = function(config) {
390+
$.validationSetup = function(config) {
391391
config = $.extend({
392392
form : 'form',
393393
validateOnBlur : true,

form-validator/jquery.form-validator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/location.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.0.14
13+
* @version 2.1.0
1414
*/
1515
(function($) {
1616

form-validator/security.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
* @website http://formvalidator.net/#security-validators
1414
* @license Dual licensed under the MIT or GPL Version 2 licenses
15-
* @version 2.0.14
15+
* @version 2.1.0
1616
*/
1717
(function($) {
1818

form-validator/sweden.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @website http://formvalidator.net/#swedish-validators
1515
* @license Dual licensed under the MIT or GPL Version 2 licenses
16-
* @version 2.0.14
16+
* @version 2.1.0
1717
*/
1818
(function($, window) {
1919

form-validator/test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@
524524

525525
var dev = window.location.hash.indexOf('dev') > -1 ? '.dev' : '';
526526

527-
$.setupForm({
527+
$.validationSetup({
528528
language : {
529529
requiredFields: 'Du måste bocka för denna'
530530
},
@@ -554,7 +554,7 @@
554554
}
555555
});
556556

557-
// Load one module outside $.setupForm() even though you do not have to
557+
// Load one module outside $.validationSetup() even though you do not have to
558558
$.formUtils.loadModules('date'+dev+'.js', false, false);
559559

560560
// Add a new validator

form-validator/uk.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @website http://formvalidator.net/#uk-validators
1111
* @license Dual licensed under the MIT or GPL Version 2 licenses
12-
* @version 2.0.14
12+
* @version 2.1.0
1313
*/
1414
$.formUtils.addValidator({
1515
name : 'ukvatnumber',

0 commit comments

Comments
 (0)