-
Notifications
You must be signed in to change notification settings - Fork 137
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
PhoneNumber scalar is not fully compatible with E.164 format #2709
Comments
Thanks for the issue! |
I will update and raise the PR for the same. @ardatan |
Hi @ardatan, do you have a timeline for when this will be released in the new version? We're using your library, and once the new version with these changes is out, we'll update our package accordingly. |
Thanks all! Now it has been released! |
Thanks, @ardatan! We've updated to the latest version, and everything is working smoothly now. I appreciate your quick response, the merge, and the opportunity to contribute to this repo! 🤝 cc: @dsengupta-mdsol |
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
Currently the regex in use for the
PhoneNumber
scalar isPHONE_NUMBER_REGEX = /^\+[1-9]\d{6,14}$/;
. Which seems incorrect. This will not allow extensions which can be 7 numeric long, even E.164 supports this, scalar will invalidate the number.To Reproduce Steps to reproduce the behavior:
Enter a phone number as
+4420794609581234
and it will get invalidated.Expected behavior
Not Wikipedia should NOT be the source of truth for this validation. Rather, there is a portal to validate E.164 format which explains the parts of E.164 numbers, matching criteria and also gives you a regular expression which is
^\+?\d{1,3}(\-|\x20)?\(?\d+\)?((\-|\x20)?\d+)+$
Environment:
The text was updated successfully, but these errors were encountered: