Class USDocumentConverters
- Namespace
- NuvTools.AspNetCore.Blazor.MudBlazor.UnitedStates.Converters
- Assembly
- NuvTools.AspNetCore.Blazor.MudBlazor.dll
Pre-configured converters for United States documents and formats.
public static class USDocumentConverters
- Inheritance
-
USDocumentConverters
- Inherited Members
Remarks
Provides ready-to-use PatternStringConverter instances for common US document formats.
Properties
LandlinePhone
Converter for landline phone numbers in format (NNN) NNN-NNNN.
public static PatternStringConverter LandlinePhone { get; }
Property Value
Examples
(555) 123-4567
MobilePhone
Converter for mobile phone numbers in format (NNN) NNN-NNNN.
public static PatternStringConverter MobilePhone { get; }
Property Value
Examples
(555) 123-4567
Phone
Converter for phone numbers in format (NNN) NNN-NNNN.
public static PatternStringConverter Phone { get; }
Property Value
Examples
(555) 123-4567
Remarks
In the United States, mobile and landline phone numbers share the same 10-digit format.
Ssn
Converter for Social Security Number (SSN) in format NNN-NN-NNNN.
public static PatternStringConverter Ssn { get; }
Property Value
Examples
123-45-6789
ZipCode
Converter for ZIP code in format NNNNN.
public static PatternStringConverter ZipCode { get; }
Property Value
Examples
90210
ZipCodePlus4
Converter for ZIP+4 code in format NNNNN-NNNN.
public static PatternStringConverter ZipCodePlus4 { get; }
Property Value
Examples
90210-1234
Methods
FormatLandlinePhone(string?)
Formats a landline phone number for display.
public static string? FormatLandlinePhone(string? value)
Parameters
valuestringThe raw phone number.
Returns
- string
The formatted landline phone number.
FormatMobilePhone(string?)
Formats a mobile phone number for display.
public static string? FormatMobilePhone(string? value)
Parameters
valuestringThe raw phone number.
Returns
- string
The formatted mobile phone number.
FormatPhone(string?)
Formats a phone number for display.
public static string? FormatPhone(string? value)
Parameters
valuestringThe raw phone number.
Returns
- string
The formatted phone number.
FormatSsn(string?)
Formats a Social Security Number for display.
public static string? FormatSsn(string? value)
Parameters
valuestringThe raw SSN value.
Returns
- string
The formatted SSN.
FormatZipCode(string?)
Formats a ZIP code for display.
public static string? FormatZipCode(string? value)
Parameters
valuestringThe raw ZIP code value.
Returns
- string
The formatted ZIP code.
FormatZipCodePlus4(string?)
Formats a ZIP+4 code for display.
public static string? FormatZipCodePlus4(string? value)
Parameters
valuestringThe raw ZIP+4 code value.
Returns
- string
The formatted ZIP+4 code.