Share via


RequiredAttributeAdapter Class

Definition

public ref class RequiredAttributeAdapter sealed : Microsoft::AspNetCore::Mvc::DataAnnotations::AttributeAdapterBase<System::ComponentModel::DataAnnotations::RequiredAttribute ^>
public sealed class RequiredAttributeAdapter : Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
type RequiredAttributeAdapter = class
    inherit AttributeAdapterBase<RequiredAttribute>
Public NotInheritable Class RequiredAttributeAdapter
Inherits AttributeAdapterBase(Of RequiredAttribute)
Inheritance

Constructors

RequiredAttributeAdapter(RequiredAttribute, IStringLocalizer)

Initializes a new instance of RequiredAttributeAdapter.

Properties

Attribute

Gets the TAttribute instance.

(Inherited from ValidationAttributeAdapter<TAttribute>)

Methods

AddValidation(ClientModelValidationContext) System.Object.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext)
GetErrorMessage(ModelMetadata, Object[])

Gets the error message formatted using the Attribute.

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

Gets the error message.

Applies to