Share via


DataAnnotationsModelValidatorProvider 類別

定義

實作預設驗證程式提供者。

public ref class DataAnnotationsModelValidatorProvider : System::Web::ModelBinding::AssociatedValidatorProvider
public class DataAnnotationsModelValidatorProvider : System.Web.ModelBinding.AssociatedValidatorProvider
type DataAnnotationsModelValidatorProvider = class
    inherit AssociatedValidatorProvider
Public Class DataAnnotationsModelValidatorProvider
Inherits AssociatedValidatorProvider
繼承
DataAnnotationsModelValidatorProvider

備註

這個類別是 的 ModelValidatorProvider 實作,可為衍生自 ValidationAttribute 的屬性提供驗證程式。 它也會為實 IValidatableObject 作 的型別提供驗證程式。

建構函式

DataAnnotationsModelValidatorProvider()

初始化 DataAnnotationsModelValidatorProvider 類別的新執行個體。

屬性

AddImplicitRequiredAttributeForValueTypes

取得或設定值,這個值表示是否需要不可為 Null 的實值型別。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetTypeDescriptor(Type)

取得指定型別的型別描述項。

(繼承來源 AssociatedValidatorProvider)
GetValidators(ModelMetadata, ModelBindingExecutionContext)

使用指定的中繼資料和執行內容,取得模型的驗證程式。

(繼承來源 AssociatedValidatorProvider)
GetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)

取得模型的驗證程式集合。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
RegisterAdapter(Type, Type)

註冊用戶端驗證的配接器。

RegisterAdapterFactory(Type, DataAnnotationsModelValidationFactory)

註冊驗證提供者的配接器 Factory。

RegisterDefaultAdapter(Type)

註冊預設配接器。

RegisterDefaultAdapterFactory(DataAnnotationsModelValidationFactory)

註冊預設配接器 Factory。

RegisterDefaultValidatableObjectAdapter(Type)

註冊預設物件驗證的配接器。

RegisterDefaultValidatableObjectAdapterFactory(DataAnnotationsValidatableObjectAdapterFactory)

註冊預設物件驗證提供者的配接器 Factory。

RegisterValidatableObjectAdapter(Type, Type)

註冊物件驗證的配接器。

RegisterValidatableObjectAdapterFactory(Type, DataAnnotationsValidatableObjectAdapterFactory)

註冊物件驗證提供者的配接器 Factory。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於