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