From 5d0880bf4bd59068da6f03cacc74f8d879e3a5a4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 22 Nov 2023 14:05:24 +0100 Subject: [PATCH] expand regexp --- idhub_auth/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idhub_auth/forms.py b/idhub_auth/forms.py index d603807..f292182 100644 --- a/idhub_auth/forms.py +++ b/idhub_auth/forms.py @@ -15,7 +15,7 @@ class ProfileForm(forms.ModelForm): def clean_first_name(self): first_name = super().clean()['first_name'] - match = r'^[a-zA-ZäöüßÄÖÜáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚßñÑ\s\'-]+' + match = r'^[a-zA-ZäöüßÄÖÜáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚßñÑçÇ\s\'-]+' if not re.match(match, first_name): txt = _("The string must contain only characters and spaces") raise forms.ValidationError(txt) @@ -24,7 +24,7 @@ class ProfileForm(forms.ModelForm): def clean_last_name(self): last_name = super().clean()['last_name'] - match = r'^[a-zA-ZäöüßÄÖÜáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚßñÑ\s\'-]+' + match = r'^[a-zA-ZäöüßÄÖÜáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚßñÑçÇ\s\'-]+' if not re.match(match, last_name): txt = _("The string must contain only characters and spaces") raise forms.ValidationError(txt)