Skip to content

Commit

Permalink
Fixed number check. (#791)
Browse files Browse the repository at this point in the history
Reusing the the check that is used when creating a member on
https://utn.se/accounts/register/
  • Loading branch information
hato1883 authored Nov 8, 2023
1 parent b444ff6 commit d76e50a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/members/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,9 @@ class CustomUserEditForm(UserEditForm):
help_text=_('Person number using the YYYYMMDD-XXXX format.'),
required=False
)
phone_number = forms.CharField(
required=True,
label=_('Phone number'),
)

phone_number = PhoneNumberField()

email = forms.EmailField(
required=True,
label=_('Email'),
Expand Down Expand Up @@ -419,10 +418,7 @@ class CustomUserCreationForm(UserCreationForm):
required=True,
label=_('Email'),
)
phone_number = forms.CharField(
required=True,
label=_('Phone number'),
)
phone_number = PhoneNumberField()
registration_year = forms.CharField(
required=False,
label=_('Registration year'),
Expand Down

0 comments on commit d76e50a

Please sign in to comment.