Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(elements,ui): Add support for password error localization #3812

Conversation

alexcarpenter
Copy link
Member

@alexcarpenter alexcarpenter commented Jul 24, 2024

Description

This PR adds a new codes argument to the render prop for <Common.FieldState> containing error codes corresponding to failed validations. This allows consumers to generate appropriate error messages based on the provided codes.

It also updates our UI package to demonstrate usage of the codes prop to generate localized error messages.

Screenshots

Screen Shot 2024-07-25 at 12 06 21 PM
Screen Shot 2024-07-25 at 12 05 59 PM
Screen Shot 2024-07-25 at 12 05 41 PM

Checklist

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Jul 24, 2024

🦋 Changeset detected

Latest commit: ce4a4c4

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

This PR includes changesets to release 1 package
Name Type
@clerk/elements 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

@dstaley dstaley marked this pull request as ready for review July 25, 2024 21:10
@dstaley dstaley requested a review from tmilewski August 1, 2024 22:18
@alexcarpenter alexcarpenter changed the title feat(ui): Add support for password localization feat(elements,ui): Add support for password localization Aug 2, 2024
@alexcarpenter alexcarpenter changed the title feat(elements,ui): Add support for password localization feat(elements,ui): Add support for password error localization Aug 2, 2024
@dstaley dstaley merged commit 1462016 into main Aug 2, 2024
18 checks passed
@dstaley dstaley deleted the alexcarpenter/sdki-155-unable-to-translate-fieldstate-with-codes-setup branch August 2, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants