Some RU/KZ/BY (and maybe other) numbers are truncated if national part of the number starts with same digit as national trunk prefix which is 8 in that case:
- for
+78005553535 expected +78005553535, got +7005553535
- for
88005553535 expected +78005553535, got +7005553535
- for
+375800111111 expected +375800111111, got +37500111111
Also RU numbers are always 11 digits in E164 form, so that +7005553535 is impossible number.
assert_eq!(
parser::parse(Some(country::RU), "+78005553535").unwrap().format().to_string(),
"+78005553535"
);
assert_eq!(
parser::parse(Some(country::RU), "88005553535").unwrap().format().to_string(),
"+78005553535"
);
assert_eq!(
parser::parse(Some(country::BY), "+375800111111").unwrap().format().to_string(),
"+375800111111"
);
Google libphonenumber handles that cases correctly: 1, 2, 3
Some RU/KZ/BY (and maybe other) numbers are truncated if national part of the number starts with same digit as national trunk prefix which is
8in that case:+78005553535expected+78005553535, got+700555353588005553535expected+78005553535, got+7005553535+375800111111expected+375800111111, got+37500111111Also RU numbers are always 11 digits in E164 form, so that
+7005553535is impossible number.Google libphonenumber handles that cases correctly: 1, 2, 3