Skip to content

Commit 97562c1

Browse files
Added doctest (#5182)
1 parent 7578e0b commit 97562c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

strings/indian_phone_validator.py

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def indian_phone_validator(phone: str) -> bool:
1616
True
1717
>>> indian_phone_validator("+91-1234567899")
1818
False
19+
>>> indian_phone_validator("+91-9876543218")
20+
True
1921
"""
2022
pat = re.compile(r"^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$")
2123
match = re.search(pat, phone)

0 commit comments

Comments
 (0)