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
errorMessage :'You have to answer an even number',
@@ -152,7 +153,7 @@ that checks if the input contains an even number.
152
153
153
154
*name* - The name of the validator, which is used in the validation attribute of the input element.
154
155
155
-
*validate* - Callback function that validates the input. Should return a boolean telling if the value is considered valid or not.
156
+
*validatorFunction* - Callback function that validates the input. Should return a boolean telling if the value is considered valid or not.
156
157
157
158
*errorMessageKey* - Name of language property that is used in case the value of the input is invalid.
158
159
@@ -228,11 +229,10 @@ var enErrorDialogs = {
228
229
badTelephone :'You have not given a correct phone number',
229
230
badSecurityAnswer :'You have not given a correct answer to the security question',
230
231
badDate :'You have not given a correct date',
231
-
tooLongStart :'You have given an answer longer than ',
232
-
tooLongEnd :' characters',
233
-
tooShortStart :'You have given an answer shorter than ',
234
-
tooShortEnd :' characters',
235
-
badLength :'You have to give an answer between ',
232
+
lengthBadStart :'You must give an answer between ',
233
+
lengthBadEnd :'characters',
234
+
lengthTooLongStart :'You have given an answer longer than ',
235
+
lengthTooShortStart :'You have given an answer shorter than ',
236
236
notConfirmed :'Values could not be confirmed',
237
237
badDomain :'Incorrect domain value',
238
238
badUrl :'The answer you gave was not a correct URL',
@@ -246,7 +246,14 @@ var enErrorDialogs = {
246
246
badAlphaNumeric :'The answer you gave must contain only alphanumeric characters ',
247
247
badAlphaNumericExtra:' and ',
248
248
wrongFileSize :'The file you are trying to upload is too large',
249
-
wrongFileType :'The file you are trying to upload is of wrong type'
249
+
wrongFileType :'The file you are trying to upload is of wrong type',
250
+
groupCheckedTooFewStart :'Please choose at least ',
251
+
groupCheckedTooManyStart :'Please choose a maximum of ',
252
+
groupCheckedRangeStart :'Please choose between ',
253
+
groupCheckedEnd :' item(s)',
254
+
255
+
_dummy--last-item-no-comma :0
256
+
250
257
};
251
258
```
252
259
@@ -279,6 +286,17 @@ that attribute will be displayed instead of the error dialog that the validation
279
286
</script>
280
287
```
281
288
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
298
+
299
+
282
300
## Changelog
283
301
284
302
#### 2.0.7
@@ -303,7 +321,7 @@ that attribute will be displayed instead of the error dialog that the validation
0 commit comments