You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
276
276
that attribute will be displayed instead of the error dialog that the validation function refers to.
277
277
278
278
## Input length restriction
@@ -287,14 +287,12 @@ that attribute will be displayed instead of the error dialog that the validation
287
287
```
288
288
289
289
## 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.
298
296
299
297
300
298
## Changelog
@@ -314,7 +312,7 @@ if **validateOnBlur** = true, jQ finds all form input elements with the data-val
314
312
* Length validation now looks at attribute data-validation-length (eg. min5, max200, 3-12).
315
313
* The validation rule no longer needs to be prefixed with "validate_" (it's still possible to use the prefix but it's considered deprecated).
316
314
* 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.
318
316
319
317
320
318
## Credits
@@ -338,5 +336,5 @@ if **validateOnBlur** = true, jQ finds all form input elements with the data-val
0 commit comments