RequiredAttributeAdapter Sınıf

Tanım

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)
Devralma

Oluşturucular

RequiredAttributeAdapter(RequiredAttribute, IStringLocalizer)

yeni bir örneğini RequiredAttributeAdapterbaşlatır.

Özellikler

Attribute

TAttribute Örneği alır.

(Devralındığı yer: ValidationAttributeAdapter<TAttribute>)

Yöntemler

AddValidation(ClientModelValidationContext)

AttributeAdapterBase<TAttribute> için RequiredAttribute.

GetErrorMessage(ModelMetadata, Object[])

kullanılarak biçimlendirilmiş Attributehata iletisini alır.

(Devralındığı yer: ValidationAttributeAdapter<TAttribute>)
GetErrorMessage(ModelValidationContextBase)

Hata iletisini alır.

Şunlara uygulanır