MinLengthAttributeAdapter 類別

定義

提供 MinLengthAttribute 屬性的介面卡。

public class MinLengthAttributeAdapter : System.Web.Mvc.DataAnnotationsModelValidator<System.ComponentModel.DataAnnotations.MinLengthAttribute>
type MinLengthAttributeAdapter = class
    inherit DataAnnotationsModelValidator<MinLengthAttribute>
Public Class MinLengthAttributeAdapter
Inherits DataAnnotationsModelValidator(Of MinLengthAttribute)
繼承

建構函式

MinLengthAttributeAdapter(ModelMetadata, ControllerContext, MinLengthAttribute)

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

屬性

Attribute

從模型驗證程式取得驗證屬性。

(繼承來源 DataAnnotationsModelValidator<TAttribute>)
ControllerContext

取得控制器內容。

(繼承來源 ModelValidator)
ErrorMessage

取得驗證失敗的錯誤訊息。

(繼承來源 DataAnnotationsModelValidator)
IsRequired

取得值,這個值表示是否需要模型驗證。

(繼承來源 DataAnnotationsModelValidator)
Metadata

取得模型驗證程式的中繼資料。

(繼承來源 ModelValidator)

方法

GetClientValidationRules()

取得用於進行長度下限檢查的用戶端驗證規則清單。

Validate(Object)

傳回模型的驗證錯誤訊息清單。

(繼承來源 DataAnnotationsModelValidator)

適用於