RegularExpressionAttributeAdapter 类

定义

RegularExpressionAttribute 特性提供适配器。

public class RegularExpressionAttributeAdapter : System.Web.Mvc.DataAnnotationsModelValidator<System.ComponentModel.DataAnnotations.RegularExpressionAttribute>
type RegularExpressionAttributeAdapter = class
    inherit DataAnnotationsModelValidator<RegularExpressionAttribute>
Public Class RegularExpressionAttributeAdapter
Inherits DataAnnotationsModelValidator(Of RegularExpressionAttribute)
继承

构造函数

RegularExpressionAttributeAdapter(ModelMetadata, ControllerContext, RegularExpressionAttribute)

初始化 RegularExpressionAttributeAdapter 类的新实例。

属性

Attribute

获取模型验证程序的验证特性。

(继承自 DataAnnotationsModelValidator<TAttribute>)
ControllerContext

获取控制器上下文。

(继承自 ModelValidator)
ErrorMessage

获取验证失败的错误消息。

(继承自 DataAnnotationsModelValidator)
IsRequired

获取一个值,该值指示是否需要模型验证。

(继承自 DataAnnotationsModelValidator)
Metadata

获取模型验证程序的元数据。

(继承自 ModelValidator)

方法

GetClientValidationRules()

获取正则表达式客户端验证规则列表。

Validate(Object)

返回模型的验证错误消息的列表。

(继承自 DataAnnotationsModelValidator)

适用于