camaraproject / QualityOnDemand

Repository to describe, develop, document and test the QualityOnDemand API family
https://wiki.camaraproject.org/x/zwOeAQ
Apache License 2.0
37 stars 60 forks source link

Make + prefix mandatory for phoneNumber #301

Closed jlurien closed 2 weeks ago

jlurien commented 2 weeks ago

What type of PR is this?

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 commented 2 weeks ago

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

hdamker commented 2 weeks ago

@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 commented 2 weeks ago

@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 commented 2 weeks ago

Yes, new pattern is copied from the artifact in Commonalities