svelte-forms icon indicating copy to clipboard operation
svelte-forms copied to clipboard

[BUG] min validator for strings not consistent

Open manstie opened this issue 2 years ago • 2 comments

Describe the bug The min validator can not be used for a text field where you want n characters and they input a number > n.

To Reproduce Steps to reproduce the behavior:

  1. Add min(8) validator to a text input
  2. Type in 9
  3. Field is valid

Expected behavior I believe a specific minLength / maxLength validator is required for this situation, as I want the validator to only validate the number of characters in the text and not the potential number value.

manstie avatar Aug 07 '22 14:08 manstie

I think you ment 2. Type in 7. But i beleave this bug has been fixed, it works for me (2.3.1).

chjlsch avatar Nov 08 '22 18:11 chjlsch

I think you ment 2. Type in 7. But i beleave this bug has been fixed, it works for me (2.3.1).

No, I want to validate the length of the string in a text field, not the numerical value.

manstie avatar Nov 09 '22 00:11 manstie