DataAnnotationsModelValidatorProvider 類別

定義

實作 ASP.NET MVC 的預設驗證提供者。

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

建構函式

DataAnnotationsModelValidatorProvider()

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

屬性

AddImplicitRequiredAttributeForValueTypes

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

方法

GetTypeDescriptor(Type)

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

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

使用中繼資料和控制器內容,取得模型的驗證程式。

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

取得驗證程式清單。

RegisterAdapter(Type, Type)

註冊配接器來提供用戶端驗證。

RegisterAdapterFactory(Type, DataAnnotationsModelValidationFactory)

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

RegisterDefaultAdapter(Type)

註冊預設配接器。

RegisterDefaultAdapterFactory(DataAnnotationsModelValidationFactory)

註冊預設配接器 Factory。

RegisterDefaultValidatableObjectAdapter(Type)

註冊配接器以提供預設物件驗證。

RegisterDefaultValidatableObjectAdapterFactory(DataAnnotationsValidatableObjectAdapterFactory)

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

RegisterValidatableObjectAdapter(Type, Type)

註冊配接器以提供物件驗證。

RegisterValidatableObjectAdapterFactory(Type, DataAnnotationsValidatableObjectAdapterFactory)

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

適用於