mirror of https://github.com/jumpserver/jumpserver
fix
parent
8ff1bae7e6
commit
b7badc146a
|
@ -49,7 +49,7 @@ class PhoneValidator:
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
try:
|
try:
|
||||||
phone = phonenumbers.parse(value)
|
phone = phonenumbers.parse(value, 'CN')
|
||||||
valid = phonenumbers.is_valid_number(phone)
|
valid = phonenumbers.is_valid_number(phone)
|
||||||
except NumberParseException:
|
except NumberParseException:
|
||||||
valid = False
|
valid = False
|
||||||
|
|
Loading…
Reference in New Issue