mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(bug) can't complete profile if phone has hyphens or spaces
This commit is contained in:
parent
e3b62df7d4
commit
3bf08973fb
@ -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
|
||||
|
||||
|
@ -59,7 +59,7 @@ export const UserProfileForm: React.FC<UserProfileFormProps> = ({ 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<User>({ defaultValues: { ...user } });
|
||||
|
Loading…
x
Reference in New Issue
Block a user