RangeAttributeAdapter 類別

定義

提供 RangeAttribute 屬性的配接器。

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

建構函式

RangeAttributeAdapter(ModelMetadata, ControllerContext, RangeAttribute)

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

屬性

Attribute

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

(繼承來源 DataAnnotationsModelValidator<TAttribute>)
ControllerContext

取得控制器內容。

(繼承來源 ModelValidator)
ErrorMessage

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

(繼承來源 DataAnnotationsModelValidator)
IsRequired

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

(繼承來源 DataAnnotationsModelValidator)
Metadata

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

(繼承來源 ModelValidator)

方法

GetClientValidationRules()

取得用於進行範圍檢查的用戶端驗證規則清單。

Validate(Object)

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

(繼承來源 DataAnnotationsModelValidator)

適用於