fix: canonicalize phone numbers as E.164

This commit is contained in:
richjohnrambo
2026-08-18 01:23:18 +08:00
parent bf562c7d56
commit e063e7879e
7 changed files with 103 additions and 6 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ func (*validator) PreCheck(cred string, params map[string]any) (string, error) {
}
countryCode, ok := params["countryCode"].(string)
if !ok {
countryCode = "US"
countryCode = "CN"
}
number, err := phonenumbers.Parse(cred, countryCode)
if err != nil {