fix(validation): implement generic country prefix validation for mobile numbers (issue #116) #118

Merged
amit merged 1 commits from fix/issue-116-country-mobile-validation into main 2026-11-25 05:13:24 +00:00
Member
  • Add validPrefixes and example fields to CountryCode interface in constants/countries.ts
  • Refactor validatePhoneNumber in utils/validation.ts to generically enforce starting prefixes across all countries
  • Clearly indicate starting prefix requirement (e.g. 'For Pakistan, the mobile number must start with 3.')
  • Improve phone input error matching in AuthModal and ProfileDrawer for mobile validation errors
- Add validPrefixes and example fields to CountryCode interface in constants/countries.ts - Refactor validatePhoneNumber in utils/validation.ts to generically enforce starting prefixes across all countries - Clearly indicate starting prefix requirement (e.g. 'For Pakistan, the mobile number must start with 3.') - Improve phone input error matching in AuthModal and ProfileDrawer for mobile validation errors
shivani added 1 commit 2026-11-23 07:28:40 +00:00
5241396999 fix(validation): implement generic country prefix validation for mobile numbers (issue #116)
- Add validPrefixes and example fields to CountryCode interface in constants/countries.ts
- Refactor validatePhoneNumber in utils/validation.ts to generically enforce starting prefixes across all countries
- Clearly indicate starting prefix requirement (e.g. 'For Pakistan, the mobile number must start with 3.')
- Improve phone input error matching in AuthModal and ProfileDrawer for mobile validation errors
amit approved these changes 2026-11-25 05:13:16 +00:00
amit merged commit 75525b17ea into main 2026-11-25 05:13:24 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AcuPedia/acupedia-store-ui#118
No description provided.