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
Components are missing an API to reveal which specific constraints have been violated when component validation fails. As a result, developers have to reproduce the entire validation logic in their listeners to be able to identify which error message should be displayed:
The validity state is partially available through the input element's validity object. However, information about some constraints is still unavailable because they are implemented as a custom feature, e.g. pattern in text-area.
Describe the solution you'd like
Components should implement an API similar to ValidityState that would indicate which specific constraints have failed to make implementing error messages cleaner.
The text was updated successfully, but these errors were encountered:
Describe your motivation
Components are missing an API to reveal which specific constraints have been violated when component validation fails. As a result, developers have to reproduce the entire validation logic in their listeners to be able to identify which error message should be displayed:
The validity state is partially available through the input element's
validity
object. However, information about some constraints is still unavailable because they are implemented as a custom feature, e.g.pattern
in text-area.Describe the solution you'd like
Components should implement an API similar to ValidityState that would indicate which specific constraints have failed to make implementing error messages cleaner.
The text was updated successfully, but these errors were encountered: