We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56ae754 commit f403487Copy full SHA for f403487
1 file changed
users/validators.py
@@ -3,13 +3,13 @@
3
4
5
def user_birthday_validator(birthday):
6
- """returns true if person > 14 years old"""
7
- if (timezone.now().date() - birthday).days >= 14 * 365:
+ """returns true if person > 12 years old"""
+ if (timezone.now().date() - birthday).days >= 12 * 365:
8
return True
9
# check if person is > 100 years old
10
if (timezone.now().date() - birthday).days >= 100 * 365:
11
raise ValidationError("Человек старше 100 лет")
12
- raise ValidationError("Человек младше 14 лет")
+ raise ValidationError("Человек младше 12 лет")
13
14
15
def user_name_validator(name):
0 commit comments