-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt to 0.28 release and phone number enhancements #19
Conversation
What patterns are allowed? |
Issue updated.
The pattern is a regex. It's pending yet to make work that field
Current docs in this repo are technical. Is there anywhere else to publish a how to use this module? |
Think from the admin perspective that is going to configure the field... |
…nd use it in front
…admin command specs
236d197
to
7f3ebd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.loom.com/share/4a5500b5f1df4c9f9f392ff657a74550
- Only phone field has some kind of validation (you can define future date for birthday, and any character in CP...)
- In the admin config isn't easy to understand the validation rule
^(\+34)?[0-9 ]{9,12}$
. This rule allow 3 extra digits +34999111222000 and numbers like 123456789 that are evident wrong spanish phone numbers - If you deactivate extra user fields (not each field) the new fields disappear from signup form but not in edit profile form. For the profile you need to deactivate each field. https://www.loom.com/share/f210af6caa88440dbbac5e511842d275
I suggest at least
- Improve validation phone rule to allow real phone numbers
- Add this explanation in the admin config: Copia esta expresión "regex"
^(\+34)?[0-9 ]{9,12}$
para validar este formato de teléfono +34999111222 - When deactivate extra user fields from admin config hide fields also from profile form
Aram define the various formats for the phone so the regex can be adjusted.
|
I'm not sure about. I found Plan nacional numeración 2021-02 Mnisterio Economía
Possible example of rules for fijo & móvil Allowed examples
And not allowed
|
I would go with the example of the URL:
completing it so a phone can start by 8 and 9 |
I have added a small change in the admin form to hide the phone number pattern and placeholder fields if the attribute is deactivated and hide the options for each field if the feature is globally disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now phone number validation works ok! 👏
3d729ad
to
b669e62
Compare
Closes https://github.com/PopulateTools/issues/issues/1926
Default pattern for spanish phonenumber:
^(\\+34)?[0-9 ]{9,12}$
Check the feature at https://decidim-redesign.populate.tools/admin/organization/edit
Pending
Screenshots
Admin:
Export Users feature:
Profile:
Register: