From 13c822a658bd8caab36a92e81d4769d1c004bc3f Mon Sep 17 00:00:00 2001 From: Hugoren Martinako Date: Thu, 4 Apr 2024 15:38:36 +0200 Subject: [PATCH] better regex --- app/views/decidim/extra_user_fields/_profile_form.html.erb | 2 +- app/views/decidim/extra_user_fields/_registration_form.html.erb | 2 +- .../admin/extra_user_fields/fields/_phone_number.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/decidim/extra_user_fields/_profile_form.html.erb b/app/views/decidim/extra_user_fields/_profile_form.html.erb index 9239dbe..fb33188 100644 --- a/app/views/decidim/extra_user_fields/_profile_form.html.erb +++ b/app/views/decidim/extra_user_fields/_profile_form.html.erb @@ -17,7 +17,7 @@ <% # TODO: move wherever it takes def telephone_pattern - "^(\\+34)?[0-9]{9}$" + "^(\\+34)?[0-9 ]{9,12}$" end def telephone_placeholder diff --git a/app/views/decidim/extra_user_fields/_registration_form.html.erb b/app/views/decidim/extra_user_fields/_registration_form.html.erb index 1a7f90c..8020125 100644 --- a/app/views/decidim/extra_user_fields/_registration_form.html.erb +++ b/app/views/decidim/extra_user_fields/_registration_form.html.erb @@ -21,7 +21,7 @@ <% # TODO: move wherever it takes def telephone_pattern - "^(\\+34)?[0-9]{9}$" + "^(\\+34)?[0-9 ]{9,12}$" end def telephone_placeholder diff --git a/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb b/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb index 8dd7cff..35cf4ca 100644 --- a/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb +++ b/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb @@ -6,7 +6,7 @@ <% # TODO: move wherever it takes def telephone_pattern - "^(\\+34)?[0-9]{9}$" + "^(\\+34)?[0-9 ]{9,12}$" end def telephone_placeholder