We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 256af88 commit 345345dCopy full SHA for 345345d
strings/phone_number_validator.py
@@ -1,4 +1,6 @@
1
import re
2
+
3
4
def validate_phone_number(phone: str) -> bool:
5
"""
6
Validates a 10-digit Indian phone number.
@@ -11,5 +13,5 @@ def validate_phone_number(phone: str) -> bool:
11
13
>>> validate_phone_number("abcdedad")
12
14
False
15
- pattern = r'^[6-9]\d{9}$'
16
+ pattern = r"^[6-9]\d{9}$"
17
return re.fullmatch(pattern, phone) is not None
0 commit comments