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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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