Sharprompt
Sharprompt copied to clipboard
Add support for as-you-type validation
For the MinLength
and MaxLength
validators, it would be useful to have the possibility of seeing an indication of how many of the allowed or required characters you have used up, for example in parentheses after the message: Type new password (3/8): ***
The indicator could be colored based on whether the current input is valid or not.
For the RegularExpression
validator, it may be harder to show a usable indicator, but it could still say ✅
/valid
or ❌
/invalid
.
Thanks for the feedback, there will be improvements to the indicator at the same time as #75.
Validation isn't perfect yet, so the feedback is greatly appreciated.