processing forms
This commit is contained in:
SDE
2023-12-01 12:51:30 +03:00
parent cc9797eb71
commit 660e3f8a99
4 changed files with 41 additions and 23 deletions

View File

@@ -0,0 +1,12 @@
from django.utils.translation import gettext as _
def get_phone_valid_error(val):
allow_chars = '01234567890()+ -'
i = 0
while i < len(val):
if val[i] not in allow_chars:
return _('Некорректные символы в номере телефона, пример корректного ввода +7 925 8600100')
i += 1
return None