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

Phone number validation doesn't allow parentheses and gives incorrect error message #562

Open
gene1wood opened this issue Feb 4, 2020 · 0 comments

Comments

@gene1wood
Copy link
Contributor

Describe the bug
If you go to edit your dinopark contacts and enter a number containing a parenthesis (e.g. +1 (212) 555-5555), the frontend shows a validation error message saying Enter country code +[1-9].

To Reproduce Problem 1
Steps to reproduce the behavior:

  1. Go to https://people.mozilla.org/e?section=contact
  2. Enter the following in the phone contact field : +1 (212) 555-5555

Expected behavior 1
No error is shown as +1 (212) 555-5555 is a valid US phone number

Actual behavior 1
A validation error message saying Enter country code +[1-9] is shown

To Reproduce Problem 2
Steps to reproduce the behavior:

  1. Go to https://people.mozilla.org/e?section=contact
  2. Enter the following in the phone contact field : abcdef

Expected behavior 1
An error message is shown indicating the expected format of the phone number or of the allowed characters

Actual behavior 1
A validation error message saying Enter country code +[1-9] is shown.

Is +[1-9] supposed to mean the string must be a + followed by a series of numbers not including 0?
Is it supposed to be a reverse regex indicating one or more instances of the numbers between 1 and 9 not including 0?

It's unclear what this error means, and all the things I can come up with aren't true (as the field must accept at least spaces, the number 0, and dashes. It should include parentheses

Screenshots
Selection_115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant