Skip to content
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

Add optional (configurable with setting) phone number validation. #820

Closed
popod opened this issue Jun 16, 2020 · 4 comments
Closed

Add optional (configurable with setting) phone number validation. #820

popod opened this issue Jun 16, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@popod
Copy link
Contributor

popod commented Jun 16, 2020

For now, no validation is done for the phone number.
Adding some validation would be great.

@alextselegidis alextselegidis self-assigned this Sep 21, 2020
@alextselegidis
Copy link
Owner

Hello!

That would be a nice thing, however phone numbers may differ from country to country.

PHP also does not have a baked in method to validate such values which means that we will need to go for an arbitrary solution.

I will skip this for now as I do not want that this potentially becomes a problem any user.

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

@popod
Copy link
Contributor Author

popod commented Sep 23, 2020

Hi,

Yes, phone number validation is very difficult.. But what about a "soft validation" ? Because, for now customers can enter "abc" in the phone number field..

For example, libphonenumber from google has a PHP implementation which allow to "soft validate" phone numbers.

An other solution will be to only allow numbers in the phone number field or a pattern like "+xxxxx" (where "x" is a number and could have a length from 5 to 20 which should cover all "normal" phone numbers in the world). And this validation could be enabled/disabled with a settings option if needed.

What do you think about that ? This is a complicated thing, but I think that improve this validation will be very useful :)

@alextselegidis
Copy link
Owner

Soft validation might actually be a good option indeed so that the app does not allow invalid data to be entered. This will also have to be implemented in the frontend so that users see something like a mask when entering data.

I will re-open the ticket and set it for v1.5.0.

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

@alextselegidis alextselegidis added this to the v1.5.0 milestone Oct 22, 2020
@alextselegidis alextselegidis added the enhancement New feature or request label Nov 29, 2020
@alextselegidis alextselegidis changed the title Phone number validation Add phone number (lightweight) validation. Jan 8, 2021
@jasimp
Copy link

jasimp commented Mar 11, 2021

Is is possible to implemented similar to gravity forms

https://docs.gravityforms.com/gform_phone_formats/

@alextselegidis alextselegidis changed the title Add phone number (lightweight) validation. Add optional (configurable with setting) phone number validation. Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants