clerk / javascript

Official Javascript repository for Clerk authentication
https://clerk.com
MIT License
958 stars 212 forks source link

feat(elements): Consider ValidityState in FieldState #3594

Closed LekoArts closed 2 weeks ago

LekoArts commented 3 weeks ago

Description

This PR adds the ValidityState (https://www.radix-ui.com/primitives/docs/components/form#validitystate) to our FieldState logic. So e.g. if someone enters an invalid email address into a <input type="email" /> and focus away, our <FieldState> will now report an error. Previously it didn't do anything.

In this PR also some data attributes were removed/renamed, see changeset + inline comments for more details.

Docs PR: https://github.com/clerk/clerk-docs/pull/1179

Fixes SDK-1638

Checklist

Type of change

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: 76391bc6d2d8cfe16a66be7d8927923916bc60af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | --------------- | ----- | | @clerk/elements | Minor | | @clerk/ui | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR