libphonenumber-csharp 8.13.12

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package libphonenumber-csharp --version 8.13.12
NuGet\Install-Package libphonenumber-csharp -Version 8.13.12
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="libphonenumber-csharp" Version="8.13.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add libphonenumber-csharp --version 8.13.12
#r "nuget: libphonenumber-csharp, 8.13.12"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install libphonenumber-csharp as a Cake Addin
#addin nuget:?package=libphonenumber-csharp&version=8.13.12

// Install libphonenumber-csharp as a Cake Tool
#tool nuget:?package=libphonenumber-csharp&version=8.13.12

Build status codecov NuGet

C# port of Google's libphonenumber library.

The code was rewritten from the Java source mostly unchanged, please refer to the original documentation for sample code and API documentation.

The original Apache License 2.0 was preserved.

See this for details about the port.

Phonenumber metadata is updated in the Google repo approximately every two weeks. This library is manually updated to include the latest metadata, usually within a day or so. There is currently plans to fully automate this https://github.com/twcclegg/libphonenumber-csharp/issues/172

Example

  var phoneNumberUtil = PhoneNumbers.PhoneNumberUtil.GetInstance();
  var e164PhoneNumber = "+44 117 496 0123";
  var nationalPhoneNumber = "2024561111";
  var smsShortNumber = "83835";
  var phoneNumber = phoneNumberUtil.Parse(e164PhoneNumber, null);
  phoneNumber = phoneNumberUtil.Parse(nationalPhoneNumber, "US");
  phoneNumber = phoneNumberUtil.Parse(smsShortNumber, "US");

Features

  • Parsing/formatting/validating phone numbers for all countries/regions of the world.
  • GetNumberType - gets the type of the number based on the number itself; able to distinguish Fixed-line, Mobile, Toll-free, Premium Rate, Shared Cost, VoIP and Personal Numbers (whenever feasible).
  • IsNumberMatch - gets a confidence level on whether two numbers could be the same.
  • GetExampleNumber/GetExampleNumberByType - provides valid example numbers for 218 countries/regions, with the option of specifying which type of example phone number is needed.
  • IsPossibleNumber - quickly guessing whether a number is a possible phonenumber by using only the length information, much faster than a full validation.
  • AsYouTypeFormatter - formats phone numbers on-the-fly when users enter each digit.
  • FindNumbers - finds numbers in text input

ToDo

  • port read/write source xml data to binary for better performance and smaller .nupkg size (WIP)
  • update / add / port new unit tests and logging from java source

How to unfold automatic generated files

  • Install Jetbrains - Resharper for Visual Studio
  • File by file, right click and "Cleanup code"
  • Check the unfolded file

Available on NuGet as package libphonenumber-csharp.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (100)

Showing the top 5 NuGet packages that depend on libphonenumber-csharp:

Package Downloads
N3O.Umbraco.Validation

TODO

GlobalPhone

Package Description

LineTen.Core

LineTen core interfaces and helper classes

Flynk.Common.Utils

Utilities for generic applications

horaios.de.Charis.Objects

Package Description

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on libphonenumber-csharp:

Repository Stars
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
ONLYOFFICE/CommunityServer
Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
notifo-io/notifo
Multi channel notification service for collaboration tools, e-commerce, news service and more.
shr670377723/CommunityServer-master
Version Downloads Last updated
8.13.37 3,396 5/17/2024
8.13.36 45,343 5/3/2024
8.13.35 71,544 4/19/2024
8.13.34 127,508 4/5/2024
8.13.33 97,158 3/25/2024
8.13.32 115,512 3/12/2024
8.13.31 140,807 2/25/2024
8.13.30 187,789 2/9/2024
8.13.29 168,507 1/26/2024
8.13.28 13,393 1/25/2024
8.13.27 416,010 12/21/2023
8.13.26 323,212 11/29/2023
8.13.25 228,702 11/20/2023
8.13.24 360,532 10/31/2023
8.13.23 227,727 10/17/2023
8.13.22 287,433 9/29/2023
8.13.21 150,186 9/20/2023
8.13.20 208,967 9/7/2023
8.13.19 232,102 8/22/2023
8.13.18 297,053 8/3/2023
8.13.17 118,524 7/27/2023
8.13.16 195,283 7/11/2023
8.13.15 1,582 7/11/2023
8.13.14 528,352 6/15/2023
8.13.13 1,622 6/15/2023
8.13.12 1,617 6/15/2023
8.13.11 857,909 4/27/2023
8.13.10 94,039 4/20/2023
8.13.9 173,916 4/10/2023
8.13.8 164,730 3/27/2023
8.13.7 564,792 3/3/2023
8.13.6 489,635 2/10/2023
8.13.5 224,026 1/29/2023
8.13.4 347,308 1/9/2023
8.13.3 341,648 12/22/2022
8.13.2 519,536 12/8/2022
8.13.1 229,609 11/28/2022
8.13.0 485,536 11/8/2022
8.12.57 642,253 10/14/2022
8.12.56 680,639 9/23/2022
8.12.55 430,025 9/9/2022
8.12.54 380,345 8/22/2022
8.12.53 416,410 8/8/2022
8.12.52 430,639 7/19/2022
8.12.51.1 142,539 7/12/2022
8.12.50 743,154 6/13/2022
8.12.49 318,100 6/1/2022
8.12.48 287,035 5/18/2022
8.12.47 6,052 5/18/2022
8.12.46 755,843 4/15/2022
8.12.45 1,057,849 3/14/2022
8.12.44 99,643 3/9/2022
8.12.43 429,843 2/14/2022
8.12.42 1,918 2/14/2022
8.12.41 1,928 2/14/2022
8.12.40 2,019 2/14/2022
8.12.39 1,995 2/14/2022
8.12.38 1,550,733 12/15/2021
8.12.37 2,419 12/15/2021
8.12.36 2,310 12/15/2021
8.12.35 2,108 12/15/2021
8.12.34 1,586,896 10/7/2021
8.12.33 376,655 9/23/2021
8.12.32 208,152 9/11/2021
8.12.31 2,451 9/11/2021
8.12.30 279,720 8/18/2021
8.12.29 2,207 8/18/2021
8.12.28 426,686 7/23/2021
8.12.27 241,857 7/8/2021
8.12.26 130,592 6/25/2021
8.12.25 130,822 6/16/2021
8.12.24 777,940 5/31/2021
8.12.23 231,005 5/13/2021
8.12.22 303,285 4/30/2021
8.12.21 328,905 4/8/2021
8.12.19 585,861 3/2/2021
8.12.18 444,327 2/10/2021
8.12.17 253,568 1/27/2021
8.12.16 141,399 1/15/2021
8.12.15 488,361 12/18/2020
8.12.14 302,924 12/4/2020
8.12.13 493,298 11/18/2020
8.12.11 1,045,076 10/9/2020
8.12.10 181,421 9/29/2020
8.12.9 394,874 9/2/2020
8.12.8 427,719 8/17/2020
8.12.7 482,132 7/21/2020
8.12.6 189,499 7/6/2020
8.12.5 2,569 7/6/2020
8.12.4 496,585 5/21/2020
8.12.3 188,911 5/8/2020
8.12.2 224,007 4/23/2020
8.12.1 479,768 3/31/2020
8.12.0 279,905 3/20/2020
8.11.5 294,739 3/3/2020
8.11.4 284,645 2/13/2020
8.11.3 274,827 2/3/2020
8.11.2 769,854 1/16/2020
8.11.1 376,080 12/12/2019
8.11.0 112,756 11/29/2019
8.10.23 86,840 11/18/2019
8.10.22 54,651 11/14/2019
8.10.21 398,128 10/17/2019
8.10.20 177,774 10/3/2019
8.10.19 176,523 9/21/2019
8.10.18 41,918 9/17/2019
8.10.17 281,572 8/16/2019
8.10.16 87,066 8/5/2019
8.10.15 192,545 7/18/2019
8.10.14 187,534 7/1/2019
8.10.13 430,240 5/31/2019
8.10.12 258,877 5/15/2019
8.10.11 82,001 5/7/2019
8.10.10 130,078 4/17/2019
8.10.9 250,818 4/5/2019
8.10.8 109,885 3/23/2019
8.10.7 146,660 3/11/2019
8.10.6 138,083 2/22/2019
8.10.5 448,166 2/8/2019
8.10.4 180,866 1/25/2019
8.10.3 125,454 1/11/2019
8.10.2 342,167 12/7/2018
8.10.1 64,519 11/29/2018
8.10.0 32,264 11/29/2018
8.9.16 368,016 10/19/2018
8.9.15 118,799 10/6/2018
8.9.14 88,014 9/21/2018
8.9.13 115,737 9/7/2018
8.9.12 224,598 8/25/2018
8.9.11 74,644 8/18/2018
8.9.10 299,273 7/12/2018
8.9.9 68,412 6/29/2018
8.9.8 70,372 6/15/2018
8.9.7 78,565 5/30/2018
8.9.6 121,314 5/16/2018
8.9.5 36,610 5/4/2018
8.9.4 100,339 4/17/2018
8.9.3 38,812 4/5/2018
8.9.2 69,256 3/19/2018
8.9.1 33,172 3/8/2018
8.9.0 48,882 2/22/2018
8.8.11 59,892 2/8/2018
8.8.10 36,493 1/25/2018
8.8.9 196,812 1/10/2018
8.8.8 147,619 12/8/2017
8.8.7 30,487 12/1/2017
8.8.6 65,950 11/17/2017
8.8.5 133,647 10/31/2017
8.8.4 133,215 10/17/2017
8.8.3 60,983 10/6/2017
8.8.2 45,503 9/22/2017
8.8.1 46,483 9/8/2017
8.8.0 92,205 8/22/2017
8.7.1 40,109 8/3/2017
8.7.0.1 54,397 7/21/2017
8.6.0.1 4,446 7/18/2017
8.6.0 39,960 7/10/2017
8.3.1.2 93,864 6/24/2017
8.3.1.1 125,802 3/13/2017
8.3.1 20,041 3/4/2017
7.7.4 319,992 11/13/2016
7.5.1 400,003 8/6/2016
7.2.5 406,391 2/11/2016
7.0.11 146,160 10/5/2015
7.0.9 79,462 8/16/2015
7.0.5.5 77,551 5/27/2015
7.0.5.4 3,142 5/23/2015
7.0.5.3 17,436 4/28/2015
7.0.5.1 2,941 4/27/2015
7.0.5 3,174 4/25/2015
4.10.0.62 278,743 8/21/2012
4.10.0.61 3,080 8/9/2012
4.10.0.59 3,246 7/27/2012
4.10.0.55 3,232 7/19/2012
4.9.0.52 3,131 7/13/2012
4.9.0.43 3,026 7/10/2012
4.9.0.42 3,145 7/9/2012
4.8.0.35 3,207 6/22/2012
4.8.0.33 3,983 6/16/2012
4.8.0.31 3,150 6/7/2012
4.8.0.30 3,670 5/31/2012
4.8.0.24 3,579 5/9/2012
4.7.0.21 4,411 4/28/2012
4.7.0.19 3,132 4/25/2012
4.6.0.16 3,458 3/30/2012
4.6.0.13 12,149 2/10/2012
4.5.0.9 6,490 1/30/2012
4.5.0.6 3,225 1/21/2012
4.5.0.4 4,096 1/20/2012
4.4.0.1 28,804 1/10/2012
3.8.0.400 3,270 11/28/2011
3.8.0.399 3,233 11/27/2011
3.8.0.394 3,262 11/24/2011
3.8.0.342 3,338 9/17/2011
3.7.1.342 3,257 9/17/2011
3.7.1.312 3,204 8/5/2011
3.7.1.306 8,274 8/5/2011