Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Phone validation rejecting valid mobile numbers: how to fix it

CNV-035High impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Your form has a phone field with a rule that decides whether a number is acceptable. The rule is wrong, so real mobile numbers get an error such as "Invalid phone number". The visitor typed a good number. Your form said no.

Common causes: a regex (a text-matching pattern) written for one country, a fixed length such as exactly 10 digits, rejecting a leading + or 00, rejecting spaces, dashes or brackets, and a built-in field type that only knows national formats.

Valid numbers that strict rules often reject (all written in common real-world formats)
Format typedWhy it often fails
+44 7911 123456Plus sign and spaces not allowed
07911 123456Rule expects exactly 10 digits, this has 11
(415) 555-0132Brackets and dash not allowed
+49 151 23456789Rule expects US-style 10 digits
0044 7911 123456Double-zero prefix not accepted
+353 85 123 4567Length or country code not in the allowed list

Why it costs you leads or sales

The people who hit this are real, interested visitors who got to the end of your form. Many will not retry. They will not email you to say the form is broken either. You see fewer leads and no error in your analytics, because the failure happens in the browser before anything is sent.

Mobile users are hit hardest. Phones autofill numbers in the device's own format, often with a + and spaces, which is exactly what strict rules reject.

Form completions by phone format acceptedExample numbers
Form completions by phone format accepted (example)Plain 10 digits: 100 % of attempts accepted; With spaces: 0 % of attempts accepted; With +country code: 0 % of attempts accepted; With brackets and dash: 0 % of attempts accepted03877100000Plain 10 digitsWith spacesWith +country codeWith brackets and dash% of attempts accepted

Example: illustrative numbers for a form that only accepts 10 plain digits. Real figures depend on your audience.

Where the lead is lost
  1. Visitor opens formPage loads fine
  2. Fills in fieldsPhone autofilled as +44 7911 123456
  3. Phone validationValid number rejected
  4. Form submittedNever happens
  5. Lead in CRMNever arrives

The visitor fills in everything correctly, then stops at the phone field.

How to check if your site has it

Test your phone field by hand
  1. Prepare a list of formats

    Use real-looking numbers for each market you sell to: national with a leading zero, international with +, with spaces, with dashes, with brackets, and with 00 prefix.

  2. Submit the form once per format

    Use a different format each time. Note which ones show an error.

  3. Test on a real phone

    Use autofill on iPhone and Android. Autofill often inserts a + and spaces.

  4. Check the page source

    Right-click the field, choose Inspect, and look for pattern=, type="tel", maxlength or minlength. Search your scripts for tel or phone and a regex.

  5. Check the server side too

    If the form passes in the browser but still fails after submit, the server or form plugin has its own rule. Test with the browser's network tab open.

A typical too-strict fieldhtml
<input type="tel" name="phone" pattern="[0-9]{10}" maxlength="10" required>

How to fix it

The safest rule is lenient: allow digits, spaces, dashes, dots, brackets and a leading +, and require between 7 and 15 digits. 15 is the maximum length of an international number. If you need clean data, normalise the number after the visitor submits rather than blocking them.

Lenient phone fieldhtml
<input type="tel" name="phone" autocomplete="tel" inputmode="tel" pattern="^\+?[0-9\s().\-]{7,20}$" title="Enter a phone number, for example +44 7911 123456">
Count digits instead of matching one formatjavascript
function isPlausiblePhone(value) {
  const allowed = /^\+?[0-9\s().\-]+$/;
  if (!allowed.test(value.trim())) return false;
  const digits = value.replace(/\D/g, '');
  return digits.length >= 7 && digits.length <= 15;
}
Fix by platform
  1. Find which plugin validates

    Open the form in your form plugin (Contact Form 7, Gravity Forms, WPForms, Elementor Forms and others). Check the phone field settings.

  2. Loosen the field

    Use the plugin's phone or tel field type and remove any custom regex or fixed length. In Contact Form 7, use the [tel] tag, which accepts international formats, or remove a custom pattern.

  3. Check for extra code

    Search your theme and snippets plugin for custom phone validation filters.

Phone field before and after

Before

  • Exactly 10 digits only
  • Rejects + and spaces
  • Autofill fails
  • Vague error message

After

  • 7 to 15 digits, common separators allowed
  • Accepts + and spaces
  • Autofill works
  • Error shows an example

How to confirm it's fixed

Confirmation checks
  • Every format in your test list submits without an error
  • Autofill on iPhone and Android is accepted
  • The lead arrives in your inbox and CRM with the number intact
  • Obvious junk such as "abc" or "123" still shows a helpful error
  • The fix works on both client and server
  • Numbers from each market you sell to have been tested

How to prevent it happening again

Prevention habits
  • Keep one phone test list with formats for every market you serve
  • Re-run it after form plugin, theme or app updates
  • Avoid copying regexes from forums without testing them
  • Keep client and server rules identical
  • Review phone rules when you launch in a new country
  • Schedule an automated test of the form

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It runs your lead form on a schedule with a robot visitor and checks that the test submission goes through. But it only checks the test phone number it is set up with. If that number passes your validation, the check passes, even if other valid formats are rejected.

What it does catch: a form that starts rejecting its own test number, for example after a plugin update or a theme change, with a screenshot and a likely cause in one alert. What it does not catch: rejection of other formats, other countries, autofill formats or numbers with a different length.

To cover the rest by hand, keep the test list from this guide and run it after every change to the form, and whenever you add a market. The Free plan includes 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.

Questions people ask

Why does my form say invalid phone number for a valid mobile number?

Usually the form uses a pattern written for one country or format. It may expect exactly 10 digits, or reject spaces, brackets or a leading plus sign. Loosen the rule to accept common separators and 7 to 15 digits.

What is the best regex for validating phone numbers?

There is no single perfect regex, because formats vary by country. A safe lenient option is ^\+?[0-9\s().\-]{7,20}$, plus a check that the digit count is between 7 and 15. For strict checks, use a library such as libphonenumber.

How many digits can a valid international phone number have?

An international number can have up to 15 digits, not counting the plus sign. Many national numbers are shorter, often 7 to 11 digits. A rule that fixes the length at 10 will reject many real numbers.

How do I stop phone validation blocking international customers?

Accept a leading plus sign and common separators, and do not fix the length to one country. Add a country selector or use a phone library if you need exact validation. Test with numbers from each country you sell to.

Should I make the phone number field required on my form?

Only if your team really needs to call the lead. Every required field is another place a visitor can fail or give up. If email follow-up is enough, make the phone optional.

Why does phone autofill fail on my form?

Autofill often inserts the number with a plus sign, country code and spaces. If your pattern allows only plain digits, it rejects the autofilled value. Use type="tel" and autocomplete="tel" and allow those characters.

Can FunnelGuard tell me if my phone validation is too strict?

Only partly. FunnelGuard submits your form with its test phone number and alerts you if that number is rejected. It does not try other formats or countries, so test those by hand.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: only the test phone.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.