1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Use phone number validator

This commit is contained in:
Yohann D'ANELLO
2020-08-05 14:14:51 +02:00
parent 6c9cf73848
commit acf7ecc4ae
7 changed files with 366 additions and 348 deletions

View File

@ -8,6 +8,8 @@ from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import gettext_lazy as _
from phonenumber_field.modelfields import PhoneNumberField
from member.models import Club, Membership
from note.models import MembershipTransaction
from permission.models import Role
@ -223,7 +225,7 @@ class WEIRegistration(models.Model):
verbose_name=_("emergency contact name"),
)
emergency_contact_phone = models.CharField(
emergency_contact_phone = PhoneNumberField(
max_length=32,
verbose_name=_("emergency contact phone"),
)