Enter Valid Phone Number Form Error
See original GitHub issueI keep getting this form error even though I have formatted my number in the following ways:
+1 01 212 555-2345 +1 01 212 5552345 +15552345 15552345 5552345 212 555 2345 2125552345
This is my model:
class Contact(models.Model): phone = PhoneNumberField(blank=True)
This is my Form:
class ExpForm(forms.Form): phone = PhoneNumberField()
And this is my template for phone:
<div id="phone" class="form_field">
{{ form.phone.errors }}
<label>{{ form.phone.label_tag }}</label>
{{ form.phone }}
</div>
How are the numbers supposed to be formatted for the Form fields? I couldn’t find any examples.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7
Top Results From Across the Web
ERROR: "Please enter a valid Phone" - Zoho Cares
Hi, The default for the US is (xxx) xxx-xxxx. If you enter the phone number with no spaces or characters (e.g. xxxxxxxxxx) it...
Read more >How do I fix "Enter a valid phone number" error when ...
Try entering the phone number without any spaces (including the + symbol, country code, and area code). Example. Phone Number: +44 1632 960098....
Read more >Why am I seeing an error with a valid phone number when ...
When attempting to register for an account using a valid phone number, I'm getting errors: Please do not enter country code in your...
Read more >"Please enter a valid phone number" message is unhelpful
1) fix the regex · 2) add help_test explaining the expected format · 3) add more information about expected format to server side...
Read more >Bad Practices on Phone Number Form Fields | by UX Movement
Your users should not wonder which phone number format is valid or get a validation error for the wrong phone number format. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am still getting the invalid phone validation error
Thank you for reporting. Our project has evolved since that time and this issue will be closed. Please update and reopen if you feel it is still applicable.