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

[BUG] min validation evaluates string as number #103

Open
grischaerbe opened this issue Jan 20, 2023 · 2 comments
Open

[BUG] min validation evaluates string as number #103

grischaerbe opened this issue Jan 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@grischaerbe
Copy link

The min validation evaluates strings that represent numbers (e.g. '1234') against their numeric value.

This field:

export const password = field('password', '', [required(), min(8)])

With this input: '8' evaluates to valid. Evaluation here.
I didn't test it but it seems max is different and is accounting for that.

@grischaerbe grischaerbe added the bug Something isn't working label Jan 20, 2023
@grischaerbe
Copy link
Author

Sorry, seems to be a duplicate of #88, can be closed if needed.

@giosifelis
Copy link

I have a possible solution in #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants