@accounts/password username validation #1213
Unanswered
MohanNarayana
asked this question in
Q&A
Replies: 1 comment 8 replies
-
Changing the regex is not really an option as it would be a breaking change for existing users. However you can use your own regex easily with this option https://www.accountsjs.com/docs/api/password/interfaces/accountspasswordoptions#optional-validateusername |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The username validation is done against this regex pattern
/^[a-zA-Z][a-zA-Z0-9]*$/
Is there a reason why username must start with a letter? I feel it should accept any alphanumeric starting with a letter or number(all numbers too). Is changing this validation a consideration?
Thanks,
Mohan
Beta Was this translation helpful? Give feedback.
All reactions