rust-phonenumber
rust-phonenumber copied to clipboard
Library for parsing, formatting and validating international phone numbers.
Long phone number are considered valid while the original libphonenumber implementation properly flags them as invalid. Example: +97233142764978
Kosovo was missing from the country codes list. - [ ] Is it properly supported in other parts? - [ ] Are other country codes absent?
- [ ] go though all unwrap usages - [ ] make sure error handling is documented appropriately
- There was a now out of sync PR https://github.com/rustonaut/rust-phonenumber/pull/5 - There was a local implementation which might or might not have merged. - There might or might not be...
strum implements AsRef and FromStr
Because `Eq` is derived for `PhoneNumber`, this happens: ```rust let full = "+1-800-555-1234".parse().unwrap(); let equivalent = `phonenumber::parse(Some(phonenumber::country::US), "800-555-1234").unwrap(); // false full == equivalent; ``` `phonenumber::country::Code` stores the `u16` as well...
Test case: `3912312312` is parsed with the lastest `main` as `12312312` ```rust PhoneNumber { code: Code { value: 39, source: Number, }, national: NationalNumber { value: 12312312, }, extension: None,...
(Currently based on #65) Follow-up from #60.
At the moment the `Database` is quite a complex data structure. I would like to make a single static database, but I'm not sure if that fit's with the design...
Bump version and update underlying dataset to the latest release at https://github.com/google/libphonenumber/releases/tag/v8.13.26.