mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 21:00:33 +02:00
Add country field in registration
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -43,9 +43,9 @@ class Team(models.Model):
|
||||
nb_letters=settings.TEAM_CODE_LENGTH),
|
||||
unique=True,
|
||||
validators=[
|
||||
RegexValidator(fr"^[A-Z]{{f'{settings.TEAM_CODE_LENGTH}'}}$"),
|
||||
RegexValidator("^[A-Z]{" + str(settings.TEAM_CODE_LENGTH) + "}$"),
|
||||
RegexValidator(fr"^(?!{'|'.join(f'{t}$' for t in settings.FORBIDDEN_TRIGRAMS)})",
|
||||
message=_("This trigram is forbidden.")),
|
||||
message=_("This team code is forbidden.")),
|
||||
],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user