MinLengthAttributeAdapter 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供 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
建構函式
MinLengthAttributeAdapter(ModelMetadata, ControllerContext, MinLengthAttribute) |
初始化 MinLenghtAttribute 類別的新執行個體。 |
屬性
Attribute |
從模型驗證程式取得驗證屬性。 (繼承來源 DataAnnotationsModelValidator<TAttribute>) |
ControllerContext |
取得控制器內容。 (繼承來源 ModelValidator) |
ErrorMessage |
取得驗證失敗的錯誤訊息。 (繼承來源 DataAnnotationsModelValidator) |
IsRequired |
取得值,這個值表示是否需要模型驗證。 (繼承來源 DataAnnotationsModelValidator) |
Metadata |
取得模型驗證程式的中繼資料。 (繼承來源 ModelValidator) |
方法
GetClientValidationRules() |
取得用於進行長度下限檢查的用戶端驗證規則清單。 |
Validate(Object) |
傳回模型的驗證錯誤訊息清單。 (繼承來源 DataAnnotationsModelValidator) |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應