mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-05-20 09:14:07 +00:00
changes isalpha() to regex while validating group name
Author: miloszowi<miloszweb@gmail.com>
This commit is contained in:
parent
33b66af781
commit
01030671f0
@ -23,7 +23,7 @@ class UpdateData():
|
||||
|
||||
if context.args and context.args[0]:
|
||||
group_name = str(context.args[0])
|
||||
if not context.args[0].isalpha():
|
||||
if not re.match(r"^[A-Za-z]+$", context.args[0]):
|
||||
raise InvalidArgumentException(re.escape('Group name must contain only letters.'))
|
||||
|
||||
if context.args[0] == Group.default_name:
|
||||
|
Loading…
x
Reference in New Issue
Block a user