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

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

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

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

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

GetClientValidationRules ( ModelMetadata metadata, System.Web.Mvc.ControllerContext context ) : IEnumerable

Returns the ModelClientValidationRangeRule as the client validation rules

NumericRangeAttribute ( double min, double max ) : System

Creates a new instance of MaxAttribute

NumericRangeAttribute ( int min, int max ) : System

Initializes a new I18N localizable instance of the System.ComponentModel.DataAnnotations.RangeAttribute class by using the specified minimum and maximum values.

NumericRangeAttribute ( string errorMessage, double min, double max ) : System

Creates a new instance of MaxAttribute

NumericRangeAttribute ( string errorMessage, int min, int max ) : System

Initializes a new I18N localizable instance of the System.ComponentModel.DataAnnotations.RangeAttribute class by using the specified minimum and maximum values.

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

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

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

Returns the ModelClientValidationRangeRule as the client validation rules
public GetClientValidationRules ( ModelMetadata metadata, System.Web.Mvc.ControllerContext context ) : IEnumerable
metadata ModelMetadata The metadata for the model.
context System.Web.Mvc.ControllerContext The controller context for the model.
Результат IEnumerable

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

Creates a new instance of MaxAttribute
public NumericRangeAttribute ( double min, double max ) : System
min double Specifies the minimum value allowed for the data field value.
max double Specifies the maximum value allowed for the data field value.
Результат System

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

Initializes a new I18N localizable instance of the System.ComponentModel.DataAnnotations.RangeAttribute class by using the specified minimum and maximum values.
public NumericRangeAttribute ( int min, int max ) : System
min int Specifies the minimum value allowed for the data field value.
max int Specifies the maximum value allowed for the data field value.
Результат System

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

Creates a new instance of MaxAttribute
public NumericRangeAttribute ( string errorMessage, double min, double max ) : System
errorMessage string
min double Specifies the minimum value allowed for the data field value.
max double Specifies the maximum value allowed for the data field value.
Результат System

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

Initializes a new I18N localizable instance of the System.ComponentModel.DataAnnotations.RangeAttribute class by using the specified minimum and maximum values.
public NumericRangeAttribute ( string errorMessage, int min, int max ) : System
errorMessage string
min int Specifies the minimum value allowed for the data field value.
max int Specifies the maximum value allowed for the data field value.
Результат System