Click or drag to resize

AcronymValidationAttribute Class

Represents a RegularExpressionAttribute for validating Acronyms, i.e., expressions that consist only of upper case letters, numbers, '!', '-', '@', '#', '_' , '.' or '$'.
Inheritance Hierarchy
SystemObject
  SystemAttribute
    System.ComponentModel.DataAnnotationsValidationAttribute
      System.ComponentModel.DataAnnotationsRegularExpressionAttribute
        GSF.ComponentModel.DataAnnotationsAcronymValidationAttribute

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

The AcronymValidationAttribute type exposes the following members.

Constructors
 NameDescription
Public methodAcronymValidationAttribute Creates a new AcronymValidationAttribute.
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