Phone Number
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
In Jframework, the Phone Number is a core identifier for user. The system uses phone numbers to:
Send and receive SMS OTPs for login and phone number verification.
Allow users to register a new user using their phone numbers.
Serve as a secure method of identity verification.
Within a single brand, each phone number must be unique. This ensures that one phone number can only be associated with a single user in that brand.
To maintain global compatibility and consistency, Jframework stores phone numbers in the E.164 format:
Begins with a "+" sign.
Followed by the country calling code.
Contains no spaces, dashes, or other special characters.
Examples:
Vietnam
0912345678
+84912345678
United States
(415) 555-2671
+14155552671
When creating or updating a phone number in Jframework:
Required — A valid phone number must be provided.
Format — Must comply with the E.164 standard.
Uniqueness — Must be unique within the same brand.
Length — Maximum of 15 digits (excluding the “+” sign).
Characters — Only "+"
followed by digits 0-9
are allowed.
Regex Pattern for E.164 Validation
^\+[1-9]\d{1,14}$
Explanation:
^
— Start of string.
\+
— Matches the “+” sign.
[1-9]
— First digit must be between 1 and 9 (no leading zero).
\d{1,14}
— Followed by 1 to 14 digits.
$
— End of string.
Stored in the database as a string in E.164 format.
Indexed by brand for fast uniqueness checks.
Normalized before storage to ensure consistent formatting across all entries.