Skip to content
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

Merged
merged 1 commit into from
Jan 26, 2024
Merged

refactor(admin): update phone number validation #706

merged 1 commit into from
Jan 26, 2024

Conversation

micharied
Copy link
Contributor

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 :)

Copy link

vercel bot commented Jan 23, 2024

@micharied is attempting to deploy a commit to the Social Income Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@ssandino ssandino left a 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

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
public ⬜️ Ignored (Inspect) Visit Preview Jan 25, 2024 3:53pm

@ssandino
Copy link
Member

@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.

@mkue
Copy link
Contributor

mkue commented Jan 26, 2024

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.

Copy link
Contributor

@mkue mkue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm👌🏼

@mkue mkue changed the title 684 | [Admin Tool Feature]: Get rid of number validation refactor(admin): update phone number validation Jan 26, 2024
@mkue mkue merged commit 774feeb into socialincome-san:main Jan 26, 2024
20 of 21 checks passed
@micharied micharied deleted the 684-number-validation branch January 26, 2024 10:22
@ssandino ssandino linked an issue Jan 26, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Admin Tool Feature]: Get rid of number validation
3 participants