Skip to content

Commit 4f762dd

Browse files
committed
fix(account): signup form did not use phone_form_field()
1 parent 64534b2 commit 4f762dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

allauth/account/forms.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class BaseSignupForm(base_signup_form_class()): # type: ignore[misc]
300300
def __init__(self, *args, **kwargs):
301301
self._signup_fields = self._get_signup_fields(kwargs)
302302
self.account_already_exists = False
303-
super(BaseSignupForm, self).__init__(*args, **kwargs)
303+
super().__init__(*args, **kwargs)
304304
username_field = self.fields["username"]
305305
username_field.max_length = get_username_max_length()
306306
username_field.validators.append(
@@ -347,7 +347,8 @@ def __init__(self, *args, **kwargs):
347347
phone = self._signup_fields.get("phone")
348348
self._has_phone_field = bool(phone)
349349
if phone:
350-
self.fields["phone"] = forms.CharField(
350+
adapter = get_adapter()
351+
self.fields["phone"] = adapter.phone_form_field(
351352
label=_("Phone"), required=phone["required"]
352353
)
353354

0 commit comments

Comments
 (0)