-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Prerequisites
- I have searched for duplicate or closed issues
Describe the issue
The rules EmptyOrLetters, NoEmptySpacesOnly, MinCharacterAmount and CharacterAmount have validation functions that show incorrect results or have unexpected results.
EmptyOrLetters: An input likeJohn123passes the validation even with numbers in it.NoEmptySpacesOnly: The Validator passes the input through theString.trim()function which means this rule always returnstrueMinCharacterAmount: If a field doesn't have therequiredrule, passing an empty value on a field with a rule likeminCharacterAmount(3)show the field as validCharacterAmount: Same case asMinCharacterAmount
Steps to Reproduce
- Initialize form validation with any of the rules
- Fill input with respective cases noted in description
- See error
Expected Behavior
EmptyOrLetters: Either change the name of the rule to something less misleading likeatLeastOneLetteror change the validation of this rule.NoEmptySpacesOnly: The rule should be removed or the validator options should allow a flag to know if.trim()should be used by default on values or not.MinCharacterAmount: I think this is working as expected, but we should be clear with how this behaviorCharacterAmount: Same case asMinCharacterAmount
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Other, Chrome, Safari, Firefox, Microsoft Edge, Opera
Other browser(s)
No response
What version of the browser are you using?
Chrome
Where does the bug occur?
Desktop
Form setup and validation rules
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working