RegularExpressionAttributeAdapter 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 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
构造函数
RegularExpressionAttributeAdapter(ModelMetadata, ControllerContext, RegularExpressionAttribute) |
初始化 RegularExpressionAttributeAdapter 类的新实例。 |
属性
Attribute |
获取模型验证程序的验证特性。 (继承自 DataAnnotationsModelValidator<TAttribute>) |
ControllerContext |
获取控制器上下文。 (继承自 ModelValidator) |
ErrorMessage |
获取验证失败的错误消息。 (继承自 DataAnnotationsModelValidator) |
IsRequired |
获取一个值,该值指示是否需要模型验证。 (继承自 DataAnnotationsModelValidator) |
Metadata |
获取模型验证程序的元数据。 (继承自 ModelValidator) |
方法
GetClientValidationRules() |
获取正则表达式客户端验证规则列表。 |
Validate(Object) |
返回模型的验证错误消息的列表。 (继承自 DataAnnotationsModelValidator) |