Class ContactType
Email, Phone
Inherited Members
Namespace: Innovt.Domain.Contacts
Assembly: Innovt.Domain.dll
Syntax
public class ContactType : ValueObject<int>
Properties
| Edit this page View SourceDescription
Gets or sets the description of the contact type.
Declaration
[Required]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
IconUrl
Gets or sets the URL to an icon associated with the contact type.
Declaration
public string IconUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the name of the contact type.
Declaration
[Required]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
RegexValidation
Gets or sets the regular expression for validation of contact values.
Declaration
public string RegexValidation { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceCreate(string, string)
Creates a new contact type with the given name and description.
Declaration
public static ContactType Create(string name, string description)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the contact type. |
string | description | The description of the contact type. |
Returns
Type | Description |
---|---|
ContactType | A new ContactType instance. |
Create(string, string, string)
Creates a new contact type with the given name, description and regex Validation
Declaration
public static ContactType Create(string name, string description, string regexValidation)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the contact type. |
string | description | The description of the contact type. |
string | regexValidation | An Regex expression to validate the Value |
Returns
Type | Description |
---|---|
ContactType |
Validate(string)
Validates a contact value based on the regex validation.
Declaration
public virtual bool Validate(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value to validate. |
Returns
Type | Description |
---|---|
bool | True if the value is valid according to the regex; otherwise, false. |