AttributeAdapterBase<TAttribute> Class

Definition

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

C#
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 Parameters

TAttribute

The type of ValidationAttribute which is being wrapped.

Inheritance
AttributeAdapterBase<TAttribute>
Derived
Implements

Constructors

Properties

Attribute

Gets the TAttribute instance.

(Inherited from ValidationAttributeAdapter<TAttribute>)

Methods

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

Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0