Allow zeroes in phone number validation

This is embarrassing :)
This commit is contained in:
Mikkel Munch Mortensen 2022-01-13 09:45:12 +01:00
parent 8acf1c3cda
commit 02690af8d6

View file

@ -107,7 +107,7 @@ class Gateway:
raise ValueError("No recipient is set.")
# Raise error if recipient is not a number.
pattern = re.compile("^[1-9]+$")
pattern = re.compile("^[0-9]+$")
if pattern.match(self.options["to"]) is None:
raise ValueError(
"Recipient number must be numbers only (no characters, spaces or +)"