Appstract.UmbracoContactNumber
1.0.22
Use this package instead
dotnet add package Appstract.UmbracoContactNumber --version 1.0.22
NuGet\Install-Package Appstract.UmbracoContactNumber -Version 1.0.22
<PackageReference Include="Appstract.UmbracoContactNumber" Version="1.0.22" />
paket add Appstract.UmbracoContactNumber --version 1.0.22
#r "nuget: Appstract.UmbracoContactNumber, 1.0.22"
// 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Newtonsoft.Json (>= 12.0.1)
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.