Add ability to check a form component's validity for setting custom messages #9229
Closed
2 of 6 tasks
Labels
4 - verified
Issues that have been released and confirmed resolved.
Calcite (dev)
Issues logged by Calcite developers.
calcite-components
Issues specific to the @esri/calcite-components package.
enhancement
Issues tied to a new feature or request.
estimate - 5
A few days of work, definitely requires updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
Milestone
Check existing issues
Description
Add a way to check the
ValidityState
of a component so custom validation messages can be set based on different constraints. The implmentation will be switched to useelementInternals
once it has full support (#8126).Acceptance Criteria
The following items are required:
calciteInvalid
event, which fires when the form is submitted with invalid values.validity
property on form components, which exposes theValidityState
. This will allow users to conditionally set custom validation messages based on the issue.Relevant Info
No response
Which Component
Form associated components
Example Use Case
https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation#complex_constraints_using_the_constraint_validation_api
Priority impact
p2 - want for current milestone
Calcite package
Esri team
Calcite (dev)
The text was updated successfully, but these errors were encountered: