File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def sendwhatmsg_instantly(
27
27
raise exceptions .CountryCodeException ("Country Code Missing in Phone Number!" )
28
28
29
29
phone_no = phone_no .replace (" " , "" )
30
- if not fullmatch (r"^\+?[0-9]{2,4}\s?[0-9]{10}$ " , phone_no ):
30
+ if not fullmatch (r"^\+?[0-9]{2,4}\s?[0-9]{9,15} " , phone_no ):
31
31
raise exceptions .InvalidPhoneNumber ("Invalid Phone Number." )
32
32
33
33
web .open (f"https://web.whatsapp.com/send?phone={ phone_no } &text={ quote (message )} " )
@@ -55,7 +55,7 @@ def sendwhatmsg(
55
55
raise exceptions .CountryCodeException ("Country Code Missing in Phone Number!" )
56
56
57
57
phone_no = phone_no .replace (" " , "" )
58
- if not fullmatch (r" ^\+?[0-9]{2,4}[0-9]{10}$" , phone_no ):
58
+ if not fullmatch (r' ^\+?[0-9]{2,4}\s? [0-9]{9,15}' , phone_no ):
59
59
raise exceptions .InvalidPhoneNumber ("Invalid Phone Number." )
60
60
61
61
if time_hour not in range (25 ) or time_min not in range (60 ):
You can’t perform that action at this time.
0 commit comments