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

fix(PinInput): remove trailing empty strings from modelValue #793

Merged

Conversation

DamianGlowala
Copy link
Contributor

Currently, trailing empty strings make it more difficult to validate the input with libraries like FormKit with one particular scenario in mind, where all strings are empty and there is a required rule applied.

Instead of ['', '', ''] (which the required rule would accept), this PR changes it to [], which this rule correctly reports as invalid.

Copy link
Collaborator

@zernonia zernonia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the similar solution in mind when you mentioned the problem! Nicely done @DamianGlowala and LGTM!

@zernonia zernonia merged commit a7dacf2 into radix-vue:main Mar 30, 2024
2 checks passed
@DamianGlowala DamianGlowala deleted the fix/pin-input-trailing-empty-strings branch March 30, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants