Skip to content

Commit

Permalink
bug #5245 Fix issue #5212 - frontend validation hits disabled element…
Browse files Browse the repository at this point in the history
…s (=)

This PR was merged into the 4.x branch.

Discussion
----------

Fix issue #5212 - frontend validation hits disabled elements

Note: background style problem mentioned in the issue is not covered

Commits
-------

8d4fd16 Fix issue #5212
  • Loading branch information
javiereguiluz committed Jul 16, 2022
2 parents 48f997a + 8d4fd16 commit 6de132d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Form {
});

form.querySelectorAll('input,select,textarea').forEach( (input) => {
if (!input.validity.valid) {
if (!input.disabled && !input.validity.valid) {
formHasErrors = true;

// Visual feedback for tabs
Expand Down

0 comments on commit 6de132d

Please sign in to comment.