Allow zeroes in phone number validation
This is embarrassing :)
This commit is contained in:
parent
8acf1c3cda
commit
02690af8d6
|
@ -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 +)"
|
||||
|
|
Loading…
Reference in a new issue