Skip to content

Commit

Permalink
fix(validator): add 98 in start of phone number
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed Apr 25, 2023
1 parent 41f2050 commit a26b6ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ export function validator<T extends StringifyableRecord>(

export function sanitizePhoneNumber(phoneNumber: string): number | null {
phoneNumber = phoneNumber.replace(/ /g, '');
if (isNumber(phoneNumber)) return +phoneNumber;
if (isNumber(phoneNumber)) return +('98' + phoneNumber);
return null;
}

0 comments on commit a26b6ae

Please sign in to comment.