Skip to content

Commit

Permalink
feat(form): optional ignore native field validations
Browse files Browse the repository at this point in the history
Co-authored-by: Marco 'Lubber' Wienkoop <[email protected]>
  • Loading branch information
alvarolm and lubber-de authored Dec 2, 2023
1 parent 0c7e318 commit 392300a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1349,13 +1349,14 @@
fieldErrors = [],
isDisabled = $field.filter(':not(:disabled)').length === 0,
validationMessage = $field[0].validationMessage,
noNativeValidation = field.noNativeValidation || settings.noNativeValidation || $field.filter('[formnovalidate],[novalidate]').length > 0 || $module.filter('[novalidate]').length > 0,
errorLimit
;
if (!field.identifier) {
module.debug('Using field name as identifier', identifier);
field.identifier = identifier;
}
if (validationMessage) {
if (validationMessage && !noNativeValidation) {
module.debug('Field is natively invalid', identifier);
fieldErrors.push(validationMessage);
fieldValid = false;
Expand Down Expand Up @@ -1627,6 +1628,7 @@
errorFocus: true,
dateHandling: 'date', // 'date', 'input', 'formatter'
errorLimit: 0,
noNativeValidation: false,

onValid: function () {},
onInvalid: function () {},
Expand Down

0 comments on commit 392300a

Please sign in to comment.