Testing practice: Irish phone numbers

I came back from holiday to find that the sprint had finished and all the stories were tested. I was pleasantly surprised, but naturally skeptical. There was a really comprehensive table (that was probably generated using an LLM) detailing test cases that covered interesting scenarios and different formats. All of the test cases were marked “passed”, but no evidence was there.

I decided to take a look myself and ended up battling with phone validation for 2 days. Here’s what I learned.


Irish Phone Numbers Are Weird

First of all, Irish phone numbers are weird. Maybe all countries' phone numbers are weird, but I don’t know. Here is what Wikipedia has to say on Irish phone number formats:

Geographic

  • 01 XXX XXXX – Dublin area
  • 0XX XXX XXXX – All other 7-digit areas
  • 0XX XXX XXX – 6-digit areas
  • 0XX XXXXX – 5-digit areas
  • 0X0X XXXXX – 5-digit areas

Non-Geographic

  • 1800 XXX XXX – Freephone/Toll Free
  • 0818 XXX XXX – Standard Rate

Mobile

  • 08X XXX XXXX

Mobile M2M (Machine to Machine)

  • 088 XXXXX XXXXX

Alphanumeric dialling, using letters as mnemonics for advertising etc., is supported but is rarely used.

The interesting things that stick out to me:

  • The capital city, Dublin, has a completely unique format compared to the rest of Ireland.
  • There are 7-digit areas, 6-digit areas, and two types of 5-digit areas.
  • Thankfully, freephone and mobile numbers seem straightforward (phew).

The Hunt for Real Numbers

The first thing I do when validating a phone or address is find an ACTUAL number.

To do that, I choose to go to Google and find a random business. Then straight away, a new type of number needs supporting — the international version.

There are two ways of formatting the international phone code:

  • +353
  • 00353

Rather annoyingly, there’s a recent trend of putting the zeros in front of the code in brackets, meaning you can’t copy phone numbers into your clipboard and dial them without removing said brackets.


Formatting Chaos

Already, we are racking up quite a combination of potential numbers. Now let’s get into how people would actually use them.

For this, let’s take a random number: 01 234 5678

Depending on who you ask, people may choose to write that number in a few different ways:

  • Spaceless012345678
  • Typical01 234 5678
  • Dashed01-234-5678
  • Dotted01.234.5678
  • Unhinged012 3456 78
  • International+3531 234 5678
  • Stuck in an airport for 20 years like Terminal0 0 3 5 3 1 2 3 4 5 67 8 (don’t know where this is going tbh)

Why This Matters

My point is that the way people input numbers depends on many factors:

  • How they see phone numbers elsewhere
  • How they read the numbers aloud
  • How numbers were formatted when copied from the web
  • How their computer auto-formatted them
  • What generation they’re in
  • Personal preference
  • …and so many more.

These are things that testers love to nerd about, but actually getting other people to care is a whole different beast.


The Big Question

Then comes the real challenge: what formats do we NEED to support?

  • Do clients know their users well enough to specify?
  • Or is it left to the developer?
  • Do we provide help text showing supported numbers?
  • Is the error message clear?

All questions worth considering before anyone says, “it’s just a phone number field.”

Related topics:

← Back to blogs

Testing practice: Irish phone numbers

Tales of testing a web form with field validation for Irish phone numbers

Forget flashy - focus on fundamentals in testing

Why testers should focus on risk and fundamentals instead of over-engineering solutions with automation.

Thoughts on Estimates in Software Engineering

A deep dive into why software estimations are so tricky, the asymmetry of estimates, and how Scrum approaches them.

Setting expectations for tester during agile ceremonies

Setting expectations that testers should follow throught each agile process to make more of an impact and provide value

My Accidental Vibe Coding Nightmare

When limitied coding experience meets AI, is it tempting to vibe code or are you entering a debugging nightmare?

Rating testing deifnitions from different orgs

Rating the definitions of software testing from page 1 of Google and explaining why I think they deserve the rating

Testing Financial data using an API

How to test time-series financial data through an API

Tales from Reddit: testing doesn't exist

My thoughts on a bizarre comment from Reddit in which a fellow tester claims testing doesn't exist and what it means to the state of testing