C# 클래스 RegularExpressionAttribute, i18N-Complete

i18N localized version of System.ComponentModel.DataAnnotations.RegularExpressionAttribute class.

Specifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression.

상속: System.ComponentModel.DataAnnotations.RegularExpressionAttribute
파일 보기 프로젝트 열기: adaptabi/i18N-Complete 1 사용 예제들

공개 메소드들

메소드 설명
FormatErrorMessage ( string name ) : string

Formats the error message to display if the regular expression validation fails.

RegularExpressionAttribute ( string pattern ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.RegularExpressionAttribute class whose error message is localized.

ErrorMessage is set to:

The field {0} must match the regular expression '{1}'.

RegularExpressionAttribute ( string errorMessage, string pattern ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.RegularExpressionAttribute class whose error message is localized.

메소드 상세

FormatErrorMessage() 공개 메소드

Formats the error message to display if the regular expression validation fails.
public FormatErrorMessage ( string name ) : string
name string The name of the field that caused the validation failure.
리턴 string

RegularExpressionAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.RegularExpressionAttribute class whose error message is localized.

ErrorMessage is set to:

The field {0} must match the regular expression '{1}'.

public RegularExpressionAttribute ( string pattern ) : System
pattern string The regular expression that is used to validate the data field value.
리턴 System

RegularExpressionAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.RegularExpressionAttribute class whose error message is localized.
public RegularExpressionAttribute ( string errorMessage, string pattern ) : System
errorMessage string An error message to associate with a validation control if validation fails.
pattern string The regular expression that is used to validate the data field value.
리턴 System