C# Class System.ComponentModel.DataAnnotations.NumericRangeAttribute

Inheritance: System.ComponentModel.DataAnnotations.RangeAttribute, IClientValidatable
Afficher le fichier Open project: adaptabi/i18N-Complete

Méthodes publiques

Méthode 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 méthode

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.
Résultat string

GetClientValidationRules() public méthode

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.
Résultat IEnumerable

NumericRangeAttribute() public méthode

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.
Résultat System

NumericRangeAttribute() public méthode

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.
Résultat System

NumericRangeAttribute() public méthode

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.
Résultat System

NumericRangeAttribute() public méthode

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.
Résultat System