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(
2727 raise exceptions .CountryCodeException ("Country Code Missing in Phone Number!" )
2828
2929 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 ):
3131 raise exceptions .InvalidPhoneNumber ("Invalid Phone Number." )
3232
3333 web .open (f"https://web.whatsapp.com/send?phone={ phone_no } &text={ quote (message )} " )
@@ -55,7 +55,7 @@ def sendwhatmsg(
5555 raise exceptions .CountryCodeException ("Country Code Missing in Phone Number!" )
5656
5757 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 ):
5959 raise exceptions .InvalidPhoneNumber ("Invalid Phone Number." )
6060
6161 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