Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

AttributeAdapterBase<TAttribute> Class

Definition

Namespace:
Microsoft.AspNetCore.Mvc.DataAnnotations
Assembly:
Microsoft.AspNetCore.Mvc.DataAnnotations.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.Mvc.DataAnnotations v2.0.0
Package:
Microsoft.AspNetCore.Mvc.DataAnnotations v2.1.0
Package:
Microsoft.AspNetCore.Mvc.DataAnnotations v2.2.0
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.36
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
AttributeAdapterBase.cs
Source:
AttributeAdapterBase.cs
Source:
AttributeAdapterBase.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

An abstract subclass of ValidationAttributeAdapter<TAttribute> which wraps up all the required interfaces for the adapters.

generic <typename TAttribute>
 where TAttribute : ValidationAttributepublic ref class AttributeAdapterBase abstract : Microsoft::AspNetCore::Mvc::DataAnnotations::ValidationAttributeAdapter<TAttribute>, Microsoft::AspNetCore::Mvc::DataAnnotations::IAttributeAdapter, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IClientModelValidator
public abstract class AttributeAdapterBase<TAttribute> : Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter<TAttribute>, Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator where TAttribute : ValidationAttribute
type AttributeAdapterBase<'Attribute (requires 'Attribute :> ValidationAttribute)> = class
 inherit ValidationAttributeAdapter<'Attribute (requires 'Attribute :> ValidationAttribute)>
 interface IAttributeAdapter
 interface IClientModelValidator
Public MustInherit Class AttributeAdapterBase(Of TAttribute)
Inherits ValidationAttributeAdapter(Of TAttribute)
Implements IAttributeAdapter, IClientModelValidator

Type Parameters

TAttribute

The type of ValidationAttribute which is being wrapped.

Inheritance
AttributeAdapterBase<TAttribute>
Derived
Implements

Constructors

Name Description
AttributeAdapterBase<TAttribute>(TAttribute, IStringLocalizer)

Instantiates a new AttributeAdapterBase<TAttribute>.

Properties

Name Description
Attribute

Gets the TAttribute instance.

(Inherited from ValidationAttributeAdapter<TAttribute>)

Methods

Name Description
AddValidation(ClientModelValidationContext)

Called to add client-side model validation.

(Inherited from ValidationAttributeAdapter<TAttribute>)
GetErrorMessage(ModelMetadata, Object[])

Gets the error message formatted using the Attribute.

(Inherited from ValidationAttributeAdapter<TAttribute>)
GetErrorMessage(ModelValidationContextBase)

Gets the error message.

Applies to


Feedback

Was this page helpful?