AcceptAttribute Class
Represents an attribute that accepts the validation of value.
Namespace: Microsoft.Web.Mvc
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Inheritance Hierarchy
System.Object
System.Attribute
System.ComponentModel.DataAnnotations.ValidationAttribute
System.ComponentModel.DataAnnotations.DataTypeAttribute
Microsoft.Web.Mvc.AcceptAttribute
Syntax
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
public sealed class AcceptAttribute : DataTypeAttribute, IClientValidatable
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false)]
public ref class AcceptAttribute sealed : DataTypeAttribute,
IClientValidatable
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)>]
type AcceptAttribute =
class
inherit DataTypeAttribute
interface IClientValidatable
end
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)>
Public NotInheritable Class AcceptAttribute
Inherits DataTypeAttribute
Implements IClientValidatable
Constructors
Name | Description | |
---|---|---|
![]() |
AcceptAttribute() | Initializes a new instance of the AcceptAttribute class. |
Properties
Name | Description | |
---|---|---|
![]() |
CustomDataType | (Inherited from DataTypeAttribute.) |
![]() |
DataType | (Inherited from DataTypeAttribute.) |
![]() |
DisplayFormat | (Inherited from DataTypeAttribute.) |
![]() |
ErrorMessage | (Inherited from ValidationAttribute.) |
![]() |
ErrorMessageResourceName | (Inherited from ValidationAttribute.) |
![]() |
ErrorMessageResourceType | (Inherited from ValidationAttribute.) |
![]() |
MimeTypes | Gets or sets the acceptance value for the mime types. |
![]() |
RequiresValidationContext | (Inherited from ValidationAttribute.) |
![]() |
TypeId | (Inherited from Attribute.) |
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | (Inherited from Attribute.) |
![]() |
FormatErrorMessage(String) | Applies formatting to an error message based on the data field where the acceptance error occurred.(Overrides ValidationAttribute.FormatErrorMessage(String).) |
![]() |
GetClientValidationRules(ModelMetadata, ControllerContext) | Gets a list of acceptance value client validation rules for the property using the specified model metadata and controller context. |
![]() |
GetDataTypeName() | (Inherited from DataTypeAttribute.) |
![]() |
GetHashCode() | (Inherited from Attribute.) |
![]() |
GetType() | (Inherited from Object.) |
![]() |
GetValidationResult(Object, ValidationContext) | (Inherited from ValidationAttribute.) |
![]() |
IsDefaultAttribute() | (Inherited from Attribute.) |
![]() |
IsValid(Object) | Determines whether the specified value is valid.(Overrides DataTypeAttribute.IsValid(Object).) |
![]() |
Match(Object) | (Inherited from Attribute.) |
![]() |
ToString() | (Inherited from Object.) |
![]() |
Validate(Object, String) | (Inherited from ValidationAttribute.) |
![]() |
Validate(Object, ValidationContext) | (Inherited from ValidationAttribute.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() |
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Return to top