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
The novalidate and formnovalidate content attributes are boolean attributes. If present, they indicate that the form is not to be validated during submission.
Therefore, it does not matter what value is assigned to the novalidate attribute. As long as this attribute is present, it is treated as TRUE - the form is not to be validated.
This change has therefore reversed the condition's behavior in all cases except one: Element::setAttribute('novalidate', true)
In my opinion, this change should be marked as "Breaking Changes".
Previous behavior
novalidate
novalidate=""
novalidate="novalidate"
novalidate="anything"
etc. are always TRUE.
Element::setAttribute('novalidate', 'anything')
rendered as novalidate="anything", which meant TRUE
Current behavior
Element::setAttribute('novalidate', 'anything')
renders nothing, which means FALSE
The text was updated successfully, but these errors were encountered:
In my opinion, this change should be marked as "Breaking Changes".
We follow semantic versioning, so breaking changes are only allowed in a new major version.
The change was made to ensure consistent handling of the boolean attributes.
For example, if you run frontend tests or use the empty string as a value, this can lead to problems. Therefore the question if there was a concrete problem in your application?
BC Break Report
Summary
There is a problem with the operation of the novalidate attribute after a change:
#273
According to the documentation: https://html.spec.whatwg.org/#attr-fs-novalidate
Therefore, it does not matter what value is assigned to the novalidate attribute. As long as this attribute is present, it is treated as TRUE - the form is not to be validated.
This change has therefore reversed the condition's behavior in all cases except one:
Element::setAttribute('novalidate', true)
In my opinion, this change should be marked as "Breaking Changes".
Previous behavior
novalidate
novalidate=""
novalidate="novalidate"
novalidate="anything"
etc. are always TRUE.
Element::setAttribute('novalidate', 'anything')
rendered as novalidate="anything", which meant TRUE
Current behavior
Element::setAttribute('novalidate', 'anything')
renders nothing, which means FALSE
The text was updated successfully, but these errors were encountered: