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
This occurs regardless of whether you use auto-init, instantiate directly, or don't use JS at all - here's a codepen with the other two cases. Were you seeing different results for those cases?
MDC Web doesn't have special logic to mark invalid fields; instead, it relies on the native implementation of HTML5 form validation and the CSS :valid pseudo-class. This behavior is working as intended according to the HTML standard for the required attribute.
Tangentially but possibly of interest, #1018 and #1092 discuss and implement adding the ability to signal validity from custom validation logic.
What MDC-Web Version are you using?
0.17.0
What browser(s) is this bug affecting? What OS are you using?
What are the steps to reproduce the bug?
required
attribute setjs
auto-init
What is the expected behavior?
The
textarea
should render normallyWhat is the actual behavior?
The component renders with a red border
Any other information you believe would be useful?
https://codepen.io/henryhadlow/pen/gxvWEO
The text was updated successfully, but these errors were encountered: