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

Make + prefix mandatory for phoneNumber #301

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

jlurien
Copy link
Collaborator

@jlurien jlurien commented Jun 13, 2024

What type of PR is this?

  • correction

What this PR does / why we need it:

Alignment with Commonalities about + prefix for international E.164 phoneNumbers

Which issue(s) this PR fixes:

Fixes #298

@hdamker
Copy link
Collaborator

hdamker commented Jun 13, 2024

@jlurien looks good, but you need to make the linter happy :-)

Copy link
Collaborator

@RandyLevensalor RandyLevensalor left a comment

Choose a reason for hiding this comment

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

This actually corrects three issues with the regex.

  1. Requires +
  2. Reduces the minimum length
  3. Decreases max length

@hdamker
Copy link
Collaborator

hdamker commented Jun 14, 2024

@RandyLevensalor

  1. Reduces the minimum length
  2. Decreases max length

Actually there is no change of these lengths, previously it was max 15 digits of [0-9] and now it is one digit [1-9] followed by max 14 digits [0-9]. The additional check is that the first digit after the + can't be 0 (as there is no country code starting with 0).

@eric-murray
Copy link
Collaborator

@RandyLevensalor
E.164 allows international numbers to be up to 15 digits long, so we need to support that even if there are no actual examples of 15 digit telephone numbers

@jlurien
Copy link
Collaborator Author

jlurien commented Jun 14, 2024

Yes, new pattern is copied from the artifact in Commonalities

Copy link
Collaborator

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

@hdamker hdamker merged commit ccc154d into camaraproject:main Jun 14, 2024
1 check passed
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.

Align phoneNumber with guidelines, with prefix + mandatory
5 participants