string-mask
string-mask copied to clipboard
Validation seems to work wrong with '9999' pattern
Hi,
i found a issue, when using a pattern like '9999'.
First my object with pattern:
Now it has following behaviors, which i think aren't correct:
Here we have one number and a few letters, which validate to true. But it should only be true if we have numbers.
It is even true, when only text is entered, but it we want a pattern of optional numbers. So it should be
false
because we have text.
If only numbers are submitted it works correctly.
If we process a string only value, it strips them away, which is a good behaivior in a way, but it would be nice to have a correct validation behavior.