The way users enter phone numbers isn't ideal right now. Also, there's no check to make sure the numbers entered are unique, so people could register two accounts with the same phone number by typing it with or without a zero.
Solution
Extra checks as well as the enhanced UX have to be added to prevent this.
Requirements
Upon accessing the relevant screen, the application should initiate a call to the provided endpoint to retrieve and display a list of countries, enabling users to view the country flags and automatically populate the code. After selecting a country, user should input their phone number in a separate field without the country code. This field will exclusively accept numeric digits, and if a zero is entered as the first digit, it should be automatically removed when sending an SMS request.
sequenceDiagram
participant User
participant Application
participant Endpoint
participant SMS Gateway
User->>Application: Access relevant screen
Application->>Endpoint: Call to fetch country codes
Endpoint->>Application: List of countries
Application->>User: Display country flags and codes
User->>Application: Select a country
User->>Application: Input phone number without code
Application->>SMS Gateway: Send SMS request (with 0 digit removal if needed)
SMS Gateway-->>User: SMS sent
Problem
The way users enter phone numbers isn't ideal right now. Also, there's no check to make sure the numbers entered are unique, so people could register two accounts with the same phone number by typing it with or without a zero.
Solution
Extra checks as well as the enhanced UX have to be added to prevent this.
Requirements
Upon accessing the relevant screen, the application should initiate a call to the provided endpoint to retrieve and display a list of countries, enabling users to view the country flags and automatically populate the code. After selecting a country, user should input their phone number in a separate field without the country code. This field will exclusively accept numeric digits, and if a zero is entered as the first digit, it should be automatically removed when sending an SMS request.
Sub-Tasks
Backend
Applications
Web
Mobile