-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add phone number types #25
Conversation
I'm out of time. Will look at the issues caught by the CI later |
Hello @JamesHutchison you can rebase this, and its will work! I will give it a review! |
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.
can we have more tests for other countries that would be super cool!
Otherwise LGTM 👍🏻
I add some changes! and test it locally its works fine! Thank you @JamesHutchison ⭐ |
@@ -2,22 +2,18 @@ | |||
|
|||
from typing import Any, Callable, Generator | |||
|
|||
import phonenumbers |
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.
This makes phonenumbers a requirement. This is probably fine as it isn't the biggest library, however the ImportError try block no longer makes sense below.
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.
Ah thanks it was an issue 👍🏻
Just to make sure, is the default format E.164 standard? |
The default format is |
How to set the default region code or the format type while using |
This introduces a generic international phone number and a phone number type that defaults to the US. The default format includes extensions.
Feel free to comment heavily.
Addresses:
From pydantic/pydantic#5012