C# Класс System.ComponentModel.DataAnnotations.MinAttribute

Наследование: System.ComponentModel.DataAnnotations.DataTypeAttribute
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FormatErrorMessage ( string name ) : string

Applies formatting to an error message, based on the data field where the error occurred.

IsValid ( object value ) : bool

Determines whether the specified value of the object is valid.

MinAttribute ( double min ) : System

Creates a new MinAttribute with the default error message "The field {0} must be greater than or equal to {1}."

MinAttribute ( int min ) : System

Creates a new MinAttribute with the default error message "The field {0} must be greater than or equal to {1}."

MinAttribute ( string errorMessage, double min ) : System

Creates a new MinAttribute with a custom localizable error message

MinAttribute ( string errorMessage, int min ) : System

Creates a new MinAttribute with a custom localizable error message

Описание методов

FormatErrorMessage() публичный Метод

Applies formatting to an error message, based on the data field where the error occurred.
public FormatErrorMessage ( string name ) : string
name string The name to include in the formatted message.
Результат string

IsValid() публичный Метод

Determines whether the specified value of the object is valid.
public IsValid ( object value ) : bool
value object The value of the object to validate.
Результат bool

MinAttribute() публичный Метод

Creates a new MinAttribute with the default error message "The field {0} must be greater than or equal to {1}."
public MinAttribute ( double min ) : System
min double The minimum value as double
Результат System

MinAttribute() публичный Метод

Creates a new MinAttribute with the default error message "The field {0} must be greater than or equal to {1}."
public MinAttribute ( int min ) : System
min int The minimum value as integer
Результат System

MinAttribute() публичный Метод

Creates a new MinAttribute with a custom localizable error message
public MinAttribute ( string errorMessage, double min ) : System
errorMessage string The custom erro message
min double The minimum value as double
Результат System

MinAttribute() публичный Метод

Creates a new MinAttribute with a custom localizable error message
public MinAttribute ( string errorMessage, int min ) : System
errorMessage string The custom erro message
min int The minimum value as integer
Результат System