Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pat-inject): Allow to submit invalid forms when form/novalidate. #1207

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

thet
Copy link
Member

@thet thet commented Oct 24, 2024

Respect the form[novalidate] and button[formnovalidate] attributes and allow the submission of invalid forms.
This is necessary if a cancel button is a submit button and needs to be allowed to submit even if the form input is invalid.

Note: there is one skipped test due to lack of formnovalidate support in jsDOM. However, I have tested it manually on a testing page. The fix seems to work in Firefox.

TODO:

  • Create an issue for jsDOM for missing button[formnovalidate] support.
  • Even fix this in jsDOM.

Respect the form[novalidate] and button[formnovalidate] attributes and
allow the submission of invalid forms.
This is necessary if a cancel button is a submit button and needs to be
allowed to submit even if the form input is invalid.
@thet thet force-pushed the scrum-2646--novalidate branch from 6682236 to 993d27d Compare October 24, 2024 21:43
@thet thet requested a review from petschki October 24, 2024 22:24
Copy link
Member

@petschki petschki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to test this on my machine in the project where I saw this problem. But the change looks logical.
Thanks!

@thet thet merged commit fa870d1 into master Oct 25, 2024
1 check passed
@thet thet deleted the scrum-2646--novalidate branch October 25, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants