How are numbers validated?

Phone number validation works differently from country to country. Below are details of how it works for some of the most called-to countries in Europe.

Spain

When validating Spanish numbers, Outbound:

  1. Confirms country code +34 or 0034
  2. Requires exactly 9 digits
  3. Ensures number starts with valid Spanish prefixes (6, 7, 8, 9, 5)
  4. Classifies number type (mobile, fixed line, VOIP etc)


Denmark

For Denmark:

  1. Confirms country code +45 or 0045
  2. Requires exactly 8 digits
  3. Validates against Danish allocated prefixes
  4. Classifies number type (mobile, fixed line, VOIP etc)
  5. Ensures region = DK through the +45 prefix


Sweden

For Sweden:

  1. Detects and removes trunk prefix 0
  2. Confirms country code +46
  3. Validates variable length rules (between 7 and 13 numbers)
  4. Checks allocated prefix ranges
  5. Classifies number type accurately (mobile, fixed line, VOIP etc)


Finland

For Finland:

  1. Removing trunk prefix 0 when parsing national format.
  2. Confirming country code +358 or 00358.
  3. Validating variable-length numbers (Finland does not have fixed length).
  4. Checking prefix allocations:
    • 04x, 05x β†’ Mobile
    • 02, 03, 09 β†’ Geographic
    • 0800 β†’ Toll-free
  5. Classifying number type accurately.

England

For England:

  1. Removes trunk 0 when converting to E.164.
  2. Confirms country code +44 or 0044.
  3. Validates complex area code structures (2–5 digit area codes).
  4. Checks major prefix ranges:
    • 07 β†’ Mobile
    • 01, 02 β†’ Geographic
    • 0800, 0808 β†’ Toll-free
    • 09 β†’ Premium

Germany

For Germany:

  1. Removes trunk prefix 0.
  2. Confirms country code +49 or 0049.
  3. Supports very wide length ranges.
  4. Checks prefix allocations:
    • 015, 016, 017 β†’ Mobile
    • 030 β†’ Berlin
    • 040 β†’ Hamburg
    • 0800 β†’ Toll-free
    • 0900 β†’ Premium
  5. Validates area-code-dependent lengths.

⚠️ Germany is one of the most variable numbering plans in Europe β€” strict validation depends heavily on metadata.


Netherlands

For Netherlands:

  1. Removes trunk prefix 0.
  2. Confirms country code +31 or 0031.
  3. Enforces 9-digit national significant number.
  4. Checks prefix allocation:
    • 06 β†’ Mobile
    • 010 β†’ Rotterdam
    • 020 β†’ Amsterdam
    • 0800 β†’ Toll-free
    • 090x β†’ Premium


Was this article helpful?