-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Is there a way to include isAlpha with spaces yet? #1282
Comments
@christopherbclark can you give an example of the input you are trying to validate for clarification. |
Sure! So, for example, if I had a database field for "project name", and I only wanted it to include letters, and spaces. Looking for a validator that would accept "My Awesome Project", but reject "My Awesome Project 99". Right now, I think both would be rejected using isAlpha because they include spaces. From the earlier stuff I read, this is because a space is neither alpha or numeric, and therefore fails. |
I get your point @christopherbclark. At the moment, |
I'd suggest just adding a config object as we've been doing with the rest, scales better, so -> How about if we had an isAlpha("my project", "en-US", { ignoreList: " " }); // true
isalpha("my awesome-project", "en-US", { ignoreList: " -" }); // true |
Looks great suggestion @profnandaa. |
I agree. Can we put @profnandaa ‘s idea to a formal vote? I think a feature like that would be super cool. |
we definitely need more consider edge cases and write more test case I hope this should be the beginning note I forgot to update fork, will clean up |
I saw a thread from 2018 where it was suggested that this feature would not be implemented. Has anyone revisited this recently? It's a huge gap, in my opinion. If it is available now, could someone please direct me on how to use it?
The text was updated successfully, but these errors were encountered: