RequiredAttributeAdapter 類別

定義

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)
繼承

建構函式

RequiredAttributeAdapter(RequiredAttribute, IStringLocalizer)

初始化 RequiredAttributeAdapter 的新執行個體。

屬性

Attribute

取得 TAttribute 執行個體。

(繼承來源 ValidationAttributeAdapter<TAttribute>)

方法

AddValidation(ClientModelValidationContext)

針對 RequiredAttributeAttributeAdapterBase<TAttribute>

GetErrorMessage(ModelMetadata, Object[])

取得使用 Attribute 格式化的錯誤訊息。

(繼承來源 ValidationAttributeAdapter<TAttribute>)
GetErrorMessage(ModelValidationContextBase)

取得錯誤訊息。

適用於