-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Added novalidate to boolean attributes array #273
Added novalidate to boolean attributes array #273
Conversation
dea11fd
to
65f94da
Compare
@krytenuk - The https://github.com/laminas/laminas-form/blob/3.20.x/src/View/Helper/Form.php#L28-L37 |
@gsteel, thank you for your response. Before implementing my fix, setting the novalidate attribute to true, After adding the attribute to the The current logic will prevent the novalidate being rendered on any other form element as the check for this is done, https://github.com/krytenuk/laminas-form/blob/fix/add-novalidate-to-boolean-attributes/src/View/Helper/AbstractHelper.php#L396, using the array you highlighted above. |
fba52df
to
d986888
Compare
Signed-off-by: Garry Childs <[email protected]>
Signed-off-by: Garry Childs <[email protected]>
Signed-off-by: Garry Childs <[email protected]>
7d8161c
to
65a43cf
Compare
Co-authored-by: George Steel <[email protected]> Signed-off-by: Garry Childs <[email protected]>
Thank you @krytenuk |
I have added novalidate to the
AbstractHelper::$booleanAttributes
array as this is a boolean attribute in HTML 5.Currently setting the
Element::setAttribute('novalidate', true)
in the form when the doc-type is set to HTML5, renders novalidate="1" rather than just novalidate.https://html.spec.whatwg.org/#attr-fs-novalidate