Skip to content

Commit

Permalink
Merge pull request #12 from Worth-NL/compat/dutchify_phone_validations
Browse files Browse the repository at this point in the history
log improvements + version fix
  • Loading branch information
UltimatePancake authored Nov 22, 2024
2 parents 039985d + 0d4544f commit eaf29c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions notifications_utils/recipients.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,13 @@ def validate_nl_phone_number(number):
number = normalise_phone_number(number).lstrip(nl_prefix).lstrip("0")

if not number.startswith("6"):
raise InvalidPhoneError("Not a dutch mobile number")
raise InvalidPhoneError(f"Not a dutch mobile number (should start with 6) :: {number}")

if len(number) > 9:
raise InvalidPhoneError("Too many digits")
raise InvalidPhoneError(f"Too many digits (>9) :: {len(number)}")

if len(number) < 9:
raise InvalidPhoneError("Not enough digits")
raise InvalidPhoneError(f"Not enough digits (<9) :: {len(number)}")

return f"{nl_prefix}{number}"

Expand Down
2 changes: 1 addition & 1 deletion notifications_utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# - `make version-minor` for new features
# - `make version-patch` for bug fixes

__version__ = "75.0.0" # 9f541edcecccf37d8e9604584f6d57a7
__version__ = "75.2.3"

0 comments on commit eaf29c4

Please sign in to comment.