语言

PatternAttribute 类

定义

提供一个正则表达式来验证字符串字段。

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
[System.Serializable]
public class PatternAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
[<System.Serializable>]
type PatternAttribute = class
    inherit Attribute
Public Class PatternAttribute
Inherits Attribute
继承
PatternAttribute
属性

注解

如果正则表达式不匹配 NotUnderstood ,模板将用于反馈。

构造函数

名称 说明
PatternAttribute(String)

正则表达式用于验证字符串字段的内容。

字段

名称 说明
Pattern

提供一个正则表达式来验证字符串字段。

适用于