Skip to main content
Home/Challenges/Coding/Armenian Phone Validator
IntermediateCoding~10 min

Armenian Phone Validator

Generate a regex that correctly validates Armenian mobile phone numbers — covering all network prefixes and the +374 country code.

Skills Tested

Regex constructionEdge case coverageSelf-testing instruction

Challenge Prompt

This is the example prompt structure. Write your own variation below.

Write a regex pattern that validates Armenian phone numbers. Requirements: (1) must match +374 and 0 prefix formats, (2) cover all major carrier prefixes (55, 77, 91, 93, 94, 95, 96, 98, 99), (3) allow optional spaces or dashes as separators, (4) reject invalid prefixes, (5) include 3 test cases: one valid, one invalid prefix, one invalid length. Output: regex pattern + JavaScript test snippet.

Your Prompt

Write your own version. Every word matters — be specific.

🪙
Reward
+100 GeraCoins

Earn GeraCoins for completing this challenge. Redeem across all Gera products.

Hints (3)
  • 1Armenian numbers are 8 digits after the country code — enforce this in your prompt.
  • 2List the exact prefixes to cover so the AI doesn't guess.
  • 3Asking for test cases forces the AI to validate its own output.

Related Topics

regexphone validationArmeniaJavaScriptpattern matching
Browse All Challenges