C# Class System.ComponentModel.DataAnnotations.NumericRangeAttribute

Inheritance: System.ComponentModel.DataAnnotations.RangeAttribute, IClientValidatable
Show file Open project: adaptabi/i18N-Complete

Public Methods

Method Description
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.

Method Details

FormatErrorMessage() public method

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.
return string

GetClientValidationRules() public method

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.
return IEnumerable

NumericRangeAttribute() public method

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.
return System

NumericRangeAttribute() public method

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.
return System

NumericRangeAttribute() public method

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.
return System

NumericRangeAttribute() public method

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.
return System