Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • A Ahad Mobile
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • holatech
  • Ahad Mobile
  • Merge requests
  • !24

fix(signup): catch bad phone and referral code before the OTP step

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Ngoc Duong requested to merge fix/signin-signup into develop Aug 26, 2026
  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 13

The signup form only checked the phone number against a loose regex, so a number the backend rejects reached POST /auth/signup and failed on the Verify Account screen — three screens past the field that could fix it.

  • Validate with libphonenumber-js against the country picked next to the field, the same library the backend validates with, and send the number in E.164 form.
  • Composing the dial code no longer strips up to four digits from a typed international number: "+84912345678" with US selected became "+12345678".
  • A referral code that cannot be verified now stops the signup there, instead of surfacing server text like "Cannot GET /refs/verify".
  • Referral rejections at the final step now get a message that says what to do about them.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/signin-signup