-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Problem description
Currently, the hashedPhoneNumber parameter in the Number Verification API lacks pattern validation. This can lead to accepting malformed hash inputs which could cause inconsistencies or potential misuse. Unlike the phoneNumber field, which is validated using E.164 format, hashedPhoneNumber requires a different validation approach due to its hashed nature.
Expected behavior
Introduce pattern validation for hashedPhoneNumber to ensure:
- The value is exactly 64 characters long.
- It only contains valid hexadecimal characters (a-f, A-F, 0-9).
This will help maintain input consistency and improve API robustness.
Alternative solution
NA
Additional context
The change complements the existing validation on phoneNumber, but adapts it for hashed input, which cannot be validated for prefix or structure due to being irreversible. This update ensures stricter input control while maintaining flexibility in accepting hashed values.