Closed benelan closed 6 months ago
Installed and assigned for verification.
Edit: You can use this codepen for testing once a .next
version releases (it will throw errors until then)
Verified in 2.8.0-next.19
with Ben's codepen using the validityStates
. 🎉
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)