Click or drag to resize

EmailValidationAttribute Class

Represents a RegularExpressionAttribute for validating e-mail addresses.
Inheritance Hierarchy
SystemObject
  SystemAttribute
    System.ComponentModel.DataAnnotationsValidationAttribute
      System.ComponentModel.DataAnnotationsRegularExpressionAttribute
        GSF.ComponentModel.DataAnnotationsEmailValidationAttribute

Namespace: GSF.ComponentModel.DataAnnotations
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter)]
public sealed class EmailValidationAttribute : RegularExpressionAttribute
View Source

The EmailValidationAttribute type exposes the following members.

Constructors
 NameDescription
Public methodEmailValidationAttribute Creates a new EmailValidationAttribute.
Top
Properties
 NameDescription
Public propertyErrorMessageGets or sets an error message to associate with a validation control if validation fails.
(Inherited from ValidationAttribute)
Public propertyErrorMessageResourceNameGets or sets the error message resource name to use in order to look up the ErrorMessageResourceType property value if validation fails.
(Inherited from ValidationAttribute)
Public propertyErrorMessageResourceTypeGets or sets the resource type to use for error-message lookup if validation fails.
(Inherited from ValidationAttribute)
Public propertyMatchTimeoutInMillisecondsGets or sets the amount of time in milliseconds to execute a single matching operation before the operation times out.
(Inherited from RegularExpressionAttribute)
Public propertyPatternGets the regular expression pattern.
(Inherited from RegularExpressionAttribute)
Public propertyRequiresValidationContextGets a value that indicates whether the attribute requires validation context.
(Inherited from ValidationAttribute)
Public propertyTypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)
Top
Methods
 NameDescription
Public methodEqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
Public methodFormatErrorMessageFormats the error message to display if the regular expression validation fails.
(Inherited from RegularExpressionAttribute)
Public methodGetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetValidationResultChecks whether the specified value is valid with respect to the current validation attribute.
(Inherited from ValidationAttribute)
Public methodIsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
Public methodIsValidChecks whether the value entered by the user matches the regular expression pattern.
(Inherited from RegularExpressionAttribute)
Public methodMatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodValidate(Object, ValidationContext)Validates the specified object.
(Inherited from ValidationAttribute)
Public methodValidate(Object, String)Validates the specified object.
(Inherited from ValidationAttribute)
Top
Fields
 NameDescription
Public fieldStatic memberDefaultErrorMessage Defines the default error message used when pattern fails validation.
Public fieldStatic memberValidationPattern Defines the regular expression pattern used to validate value.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also