MailAddressValidator Class
Contains static methods for mail address validation.
- Inheritance:
- System.ObjectMailAddressValidator
Methods
Validate(MailAddress)
Validates the specified mail address.
public static MailAddressValidationResult Validate(MailAddress address)
Public Shared Function Validate(address As MailAddress) As MailAddressValidationResult
Parameters
address
- MailAddress
The mail address.
Returns
A MailAddressValidationResult value, representing the result of validation.
Validate(MailAddress, MailAddressValidationOptions)
Validates the specified mail address.
public static MailAddressValidationResult Validate(MailAddress address, MailAddressValidationOptions options)
Public Shared Function Validate(address As MailAddress, options As MailAddressValidationOptions) As MailAddressValidationResult
Parameters
address
- MailAddress
The mail address.
options
- MailAddressValidationOptions
Indicates which options will be validated
Returns
A MailAddressValidationResult value, representing the result of validation.
Validate(IEnumerable<MailAddress>)
Validates the collection of mail addresses.
public static IList<MailAddressValidationResult> Validate(IEnumerable<MailAddress> addresses)
Public Shared Function Validate(addresses As IEnumerable(Of MailAddress)) As IList(Of MailAddressValidationResult)
Parameters
addresses
- System.Collections.Generic.IEnumerable<MailAddress>
The collection of mail addresses.
Returns
- System.Collections.Generic.IList<MailAddressValidationResult>
A read-only list of MailAddressValidationResult values, representing the results of validation.
Validate(IEnumerable<MailAddress>, MailAddressValidationOptions)
Validates the collection of mail addresses.
public static IList<MailAddressValidationResult> Validate(IEnumerable<MailAddress> addresses, MailAddressValidationOptions options)
Public Shared Function Validate(addresses As IEnumerable(Of MailAddress), options As MailAddressValidationOptions) As IList(Of MailAddressValidationResult)
Parameters
addresses
- System.Collections.Generic.IEnumerable<MailAddress>
The collection of mail addresses.
options
- MailAddressValidationOptions
Indicates which options will be validated
Returns
- System.Collections.Generic.IList<MailAddressValidationResult>
A read-only list of MailAddressValidationResult values, representing the results of validation.
Validate(IEnumerable<String>)
Validates the collection of mail addresses.
public static IList<MailAddressValidationResult> Validate(IEnumerable<string> addresses)
Public Shared Function Validate(addresses As IEnumerable(Of String)) As IList(Of MailAddressValidationResult)
Parameters
addresses
- System.Collections.Generic.IEnumerable<System.String>
The collection of mail addresses.
Returns
- System.Collections.Generic.IList<MailAddressValidationResult>
A read-only list of MailAddressValidationResult values, representing the results of validation.
Validate(IEnumerable<String>, MailAddressValidationOptions)
Validates the collection of mail addresses.
public static IList<MailAddressValidationResult> Validate(IEnumerable<string> addresses, MailAddressValidationOptions options)
Public Shared Function Validate(addresses As IEnumerable(Of String), options As MailAddressValidationOptions) As IList(Of MailAddressValidationResult)
Parameters
addresses
- System.Collections.Generic.IEnumerable<System.String>
The collection of mail addresses.
options
- MailAddressValidationOptions
Indicates which options will be validated
Returns
- System.Collections.Generic.IList<MailAddressValidationResult>
A read-only list of MailAddressValidationResult values, representing the results of validation.
Validate(String)
Validates the specified mail address.
public static MailAddressValidationResult Validate(string address)
Public Shared Function Validate(address As String) As MailAddressValidationResult
Parameters
address
- System.String
The mail address.
Returns
A MailAddressValidationResult value, representing the result of validation.
Validate(String, MailAddressValidationOptions)
Validates the specified mail address
public static MailAddressValidationResult Validate(string address, MailAddressValidationOptions options)
Public Shared Function Validate(address As String, options As MailAddressValidationOptions) As MailAddressValidationResult
Parameters
address
- System.String
The mail address.
options
- MailAddressValidationOptions
Indicates which options will be validated
Returns
A MailAddressValidationResult value, representing the result of validation.