Closed mZbZ closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
e186814
) to head (88a0105
). Report is 40 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
A number of improvements for the existing phone number type validator
Primarily this change adds logic for the existing variable
supported_regions
in the validator, this was currently preforming no function at all. If a user supplies a list of two digit phone number regions to the class the validator will now callphonenumbers
to check if the parsed number is indeed within one of the regions supplied or else raise aValidationError
. Ifsupported_regions
is an empty list (As is now the default), a valid phone number from any region will be accepted.Additionally, this change:
supported_formats
variable , these values can be looked up from thephonenumbers
library if needed, no need to re-instantiate this heremin_length
andmax_length
parameters, seeing as this is a wrapper aroundphonenumbers
, the resultant string length should be the responsibility for formatting operation from that library.