Skip to content

Commit f403487

Browse files
committed
you can register from 12 years old now
1 parent 56ae754 commit f403487

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

users/validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44

55
def user_birthday_validator(birthday):
6-
"""returns true if person > 14 years old"""
7-
if (timezone.now().date() - birthday).days >= 14 * 365:
6+
"""returns true if person > 12 years old"""
7+
if (timezone.now().date() - birthday).days >= 12 * 365:
88
return True
99
# check if person is > 100 years old
1010
if (timezone.now().date() - birthday).days >= 100 * 365:
1111
raise ValidationError("Человек старше 100 лет")
12-
raise ValidationError("Человек младше 14 лет")
12+
raise ValidationError("Человек младше 12 лет")
1313

1414

1515
def user_name_validator(name):

0 commit comments

Comments
 (0)