diff --git a/CHANGELOG.md b/CHANGELOG.md index 60944d13d..de165e726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Script to download translations from Crowdin - Fix a bug: admin and managers can't cancel or move event reservations +- Fix a bug: phone numbers with hyphens and spaces prevent profile completion when the data is provided by a SSO ## v5.4.17 2022 September 06 diff --git a/app/frontend/src/javascript/components/user/user-profile-form.tsx b/app/frontend/src/javascript/components/user/user-profile-form.tsx index 1c449c0e5..f4aedbb08 100644 --- a/app/frontend/src/javascript/components/user/user-profile-form.tsx +++ b/app/frontend/src/javascript/components/user/user-profile-form.tsx @@ -59,7 +59,7 @@ export const UserProfileForm: React.FC = ({ action, size, const { t } = useTranslation('shared'); // regular expression to validate the input fields - const phoneRegex = /^((00|\+)\d{2,3})?\d{4,14}$/; + const phoneRegex = /^((00|\+)\d{2,3})?[\d -]{4,14}$/; const urlRegex = /^(https?:\/\/)([^.]+)\.(.{2,30})(\/.*)*\/?$/; const { handleSubmit, register, control, formState, setValue, reset } = useForm({ defaultValues: { ...user } });