-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
refactor(admin): update phone number validation #706
Conversation
@micharied is attempting to deploy a commit to the Social Income Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Final review by: @mkue
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@micharied, just for your information: @mkue is currently traveling and will review this as soon as possible. In the meantime, please feel free to reach out at [email protected], and we can add you to our Slack channel. |
Cool, thank you for your contribution :) This looks good for the moment. But in general, I think we should switch to using a string to store a phone number using the + prefix. The validity of the phone number could then easily be checked with a regex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm👌🏼
Changed the number validation so that every country code is allowed, but only numbers with a min. length of 5 and a max length of 15 digits. Moreover, now only integers are allowed because a phone number can't be a decimal number.
Note: I couldn't find any tests for the validation. Should we add some tests?
It's my first open-source contribution, so I am happy about every feedback.
Greetings Micha :)