Appstract.UmbracoContactNumber 1.0.22

Suggested Alternatives

UmbracoContactNumber 1.1.0.28

Additional Details

Use this package instead

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Appstract.UmbracoContactNumber --version 1.0.22
NuGet\Install-Package Appstract.UmbracoContactNumber -Version 1.0.22
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="Appstract.UmbracoContactNumber" Version="1.0.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Appstract.UmbracoContactNumber --version 1.0.22
#r "nuget: Appstract.UmbracoContactNumber, 1.0.22"
#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 Appstract.UmbracoContactNumber as a Cake Addin
#addin nuget:?package=Appstract.UmbracoContactNumber&version=1.0.22

// Install Appstract.UmbracoContactNumber as a Cake Tool
#tool nuget:?package=Appstract.UmbracoContactNumber&version=1.0.22

Usage

Auto-generated model classes (using the Umbraco Models Builder) will automatically generate properties using the Appstract.UmbracoContactNumber.ContactNumber class.

Umbraco will deserialize the value into this class automatically, when having the following property on the model class (the example uses the Model Builder API approach to model generation):

namespace ...
{
	public class ... : UmbracoContentModel
	{
		...

		///<summary>
		/// Phone
		///</summary>
		[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
		[ImplementPropertyType("phone")]
		public Appstract.UmbracoContactNumber.ContactNumber Phone => this.Value<Appstract.UmbracoContactNumber.ContactNumber>("phone");
	}
}

The ContactNumber class gives access to the raw information put into the property editor, but also a property that formats the input.

If the country code has been set to Denmark (+45) and the number to 98765432, the FormattedContactNumber property will return +45 98765432.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

1.0.0 Initial release with hardcoded country database.