What breaks

Phone number validation: why valid numbers fail

The form turns down a number the caller knows is correct, because the rule expects one written format. A simulated visitor enters the same number four ways to show which one the field refuses.

5 visitors try to .
First test free with an accountRun it from your coding agent

Why does phone number validation reject valid numbers?

A phone field usually fails because its rule expects one written format, such as ten digits and nothing else, and the caller typed the same number with a country code, a leading zero or brackets. Strip the spaces, dashes and brackets before the check, and accept a leading plus with a country code, allowing up to the 15 digits an international number can hold. A simulated test enters the same number four ways and shows which form the field refuses.

What this looks like in a report

Who
Ines, a nurse in Lisbon asking a bathroom fitter for a callback
How they arrived
Opened the fitter's page from a local search on her phone
Where they stopped
Callback form, at the phone box

“I typed my number the way I always write it, with +351 and a space. The box went red and said invalid. I took the plus out and it still said invalid, so I gave up and emailed another company.”

The fix. Remove spaces, dashes and brackets before the check, and accept a leading plus with a country code. Show one example of the expected format under the box, so a caller knows what it wants.

An illustration. Run a test to see your own.See a real sample report

The number is correct, and the rule counts it as wrong

A caller types the number they would dial. A UK caller writes 07700 900123, a US caller writes (555) 010-0123, and a caller abroad writes +44 7700 900123. A field that accepts only digits, or exactly ten of them, refuses at least one of those. The visitor sees a red line under the box and no hint about which character is wrong, so they assume the number itself is bad. Some rules count the characters in the raw text, so the spaces alone push a correct number over the limit. Others accept only the national format and reject the plus sign. The number is fine. The rule is wrong.

  • Type the number with a plus sign and a country code. Does the field accept it unchanged?
  • Type the same number with spaces, dashes and brackets. Are the separators removed before the check?
  • Type it with the national leading zero. Does the field refuse the zero?
  • Read the error text. Does it name the problem, or only say invalid?

Four ways a caller writes the same number

The same number can arrive in at least four shapes. A caller who writes it for a friend drops the country code. A caller who copies it from a business card adds spaces and brackets. Someone sending it from abroad starts with a plus and a country code, and someone in a country that uses a trunk prefix starts with a zero that the international form drops. Each of these is the same line on a phone. A rule that expects one of them rejects the other three, and the field has no way to know they match.

Most failures come from one of two shapes of rule. A digit count rule accepts only ten digits, so every number with a country code is too long. A pattern rule accepts only the national format, so the plus sign is an unexpected character. Both are simple to write, and both pass the test the developer ran, which used the developer's own number in the developer's own format. The caller who fails is the one whose number was never in that test.

Digit counts break on other countries

National numbers differ in length from country to country, and a country code adds digits in front of them. The international standard for phone numbers, E.164, caps a full number with its country code at 15 digits. A rule that accepts only one length rejects every number that needs a different one, and a visitor cannot see which length the rule wants unless the field says so.

The leading zero is the other trap. Many countries print a zero before the national number and drop it when the number is written with its country code. A caller who copies the number from a letter keeps the zero, and a caller who copies it from a contact card may not. A rule that rejects the zero, or counts it in one place and not another, refuses the same person in two forms. Store the number in one format, the international one, and convert what the caller typed before the check runs.

Decide how strict to be, and say what you accept

Strictness is a choice about who the form is for. A form that only takes numbers from one country should say so beside the field and accept only that country's format. A form for buyers across the world should accept any length within the 15 digit limit, strip the separators, and check that what remains is only digits. Either way, the field should say what it wants in one short line, so the caller does not have to guess.

A check in the browser can only say a number looks plausible. It cannot prove the number reaches a phone. Simulated visitors have a working email inbox but cannot receive a text message, so a code sent by text is outside what the test can do. Test that step with a real phone and a code you send yourself. Use the simulated run to find the shapes the field refuses, then fix the rule for those shapes.

What you get with Mimiq

  1. 01

    Run it by hand, or on every pull request

    Paste a link and a task in the app and watch the visitors work. Or run them on every preview deploy: the GitHub Action comments on the pull request, any other CI can call the MCP endpoint, and your coding agent can run it too.

  2. 02

    Bugs and usability problems in one report

    The browser records errors and failed or slow requests on the step they happened. The visitors say where the wording or the steps confused them, and where they left.

  3. 03

    Visitors that behave like your audience

    Each visitor is a different profile with a reason to be there, matched to who the page is for, described by you, or built from your own customers.

  4. 04

    A prompt to fix each problem

    Every problem comes with a fix to paste into Cursor, Claude Code, Lovable or any coding agent, and one prompt hands over the top problems at once. Then send the same visitors through again.

  5. 05

    Follow every visitor

    See each visitor's whole path, step by step with screenshots, and what it was thinking at every step. Ask any visitor a question.

The browser records relevant JavaScript errors and failed or slow app requests encountered during the run, attached to the step where they occurred. The visitors are simulated: they find problems, they do not predict how many real people will convert.

A new country on the form can bring the rejection back

Adding a country to your order form, changing the field's label or updating the validation code can change which numbers pass. Rerun the same four formats after each change, and compare the step where each one stopped with your last run. A form behind a login can be tested with a test account from paid credits.

Starter

Try it on one launch

$9 once
120 credits, never expire

24 visitors, about 4 tests of 5

  • Visitors on your landing page, signup and checkout
  • Where they left and why, with a fix to copy for each problem
  • Run it in the app or on every pull request
  • Ask any visitor a question, included
  • Test accounts and protected previews
Buy 120 credits

Builder

Test every build

$19 a month
500 credits every month

100 visitors, about 20 tests of 5

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Cancel anytime
Choose Builder

Pro

Test every release, as a team

$49 a month
1,500 credits every month

300 visitors, about 60 tests of 5

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Cancel anytime
Choose Pro

Scale

Test at scale, every day

$149 a month
6,000 credits every month

1,200 visitors, about 240 tests of 5

  • Everything in Starter
  • Credits refill each month, and what is left rolls over once
  • Priority support
  • Cancel anytime
Choose Scale
$0for your first test, with a free account (Google or email, no card). It includes 50 credits, enough for 10 visitors. After that a visitor uses 5 credits, and packs start at $9 for 120 credits.
See a sample report

Questions

Should I require a country code?

Require it only if your product is for one country, and say so beside the field. For a form that reaches buyers in several countries, make the country code optional and read a plus sign as the start of an international number. A missing country code should not cost a caller their request.

Can a simulated test confirm a phone number is real?

No. A simulated visitor enters the number you give it and reports whether the form accepted the shape. It cannot tell whether the number reaches a phone, and it cannot receive a text, so check that step with a real phone and a code you send yourself.

Does the phone input type change the check?

Setting the field to the telephone type brings up a number keypad on many phones, which helps the caller. It does not check the value. The rule still needs its own check, in the browser for quick feedback and on the server for the final answer.

Should the server check the number too?

Yes. A check that runs only in the browser can be skipped, and a script error can stop it from running at all. Run the same rule on the server, so the number a caller sends gets the same answer in both places.

What is the longest valid phone number?

Under the international numbering standard, a full number with its country code has at most 15 digits. A maximum below that rejects real numbers, so set the limit to 15 digits after the separators are removed, and count only the digits.

Keep reading

Send visitors and see what breaks first.

Your first test is free: sign in with Google or email and it starts right away. Last checked 2026-12-03.

5 visitors try to .