C# Class Castle.Components.Validator.ValidateRangeAttribute

Inheritance: Castle.Components.Validator.AbstractValidationAttribute
Afficher le fichier Open project: nats/castle-1.0.3-mono

Méthodes publiques

Méthode Description
Build ( ) : IValidator

Constructs and configures an IValidator instance based on the properties set on the attribute instance.

ValidateRangeAttribute ( System.DateTime min, System.DateTime max ) : System

Initializes a DateTime-based range validator.

ValidateRangeAttribute ( System.DateTime min, System.DateTime max, string errorMessage ) : System

Initializes a DateTime-based range validator.

ValidateRangeAttribute ( RangeValidationType type, object min, object max ) : System

Initializes a range validator of a specified type.

ValidateRangeAttribute ( RangeValidationType type, object min, object max, string errorMessage ) : System

Initializes a range validator of a specified type.

ValidateRangeAttribute ( decimal min, decimal max ) : System

Initializes an decimal-based range validator.

ValidateRangeAttribute ( decimal min, decimal max, string errorMessage ) : System

Initializes an decimal-based range validator.

ValidateRangeAttribute ( int min, int max ) : System

Initializes an integer-based range validator.

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

Initializes an integer-based range validator.

ValidateRangeAttribute ( string min, string max ) : System

Initializes a string-based range validator.

ValidateRangeAttribute ( string min, string max, string errorMessage ) : System

Initializes a string-based range validator.

Method Details

Build() public méthode

Constructs and configures an IValidator instance based on the properties set on the attribute instance.
public Build ( ) : IValidator
Résultat IValidator

ValidateRangeAttribute() public méthode

Initializes a DateTime-based range validator.
public ValidateRangeAttribute ( System.DateTime min, System.DateTime max ) : System
min System.DateTime The minimum value, or DateTime.MinValue if this should not be tested.
max System.DateTime The maximum value, or DateTime.MaxValue if this should not be tested.
Résultat System

ValidateRangeAttribute() public méthode

Initializes a DateTime-based range validator.
public ValidateRangeAttribute ( System.DateTime min, System.DateTime max, string errorMessage ) : System
min System.DateTime The minimum value, or DateTime.MinValue if this should not be tested.
max System.DateTime The maximum value, or DateTime.MaxValue if this should not be tested.
errorMessage string The error message to be displayed if the validation fails.
Résultat System

ValidateRangeAttribute() public méthode

Initializes a range validator of a specified type.
public ValidateRangeAttribute ( RangeValidationType type, object min, object max ) : System
type RangeValidationType The data type to be used by the range validator.
min object The minimum value, or DateTime.MinValue if this should not be tested.
max object The maximum value, or DateTime.MaxValue if this should not be tested.
Résultat System

ValidateRangeAttribute() public méthode

Initializes a range validator of a specified type.
public ValidateRangeAttribute ( RangeValidationType type, object min, object max, string errorMessage ) : System
type RangeValidationType The data type to be used by the range validator.
min object The minimum value, or DateTime.MinValue if this should not be tested.
max object The maximum value, or DateTime.MaxValue if this should not be tested.
errorMessage string The error message to be displayed if the validation fails.
Résultat System

ValidateRangeAttribute() public méthode

Initializes an decimal-based range validator.
public ValidateRangeAttribute ( decimal min, decimal max ) : System
min decimal The minimum value, or decimal.MinValue if this should not be tested.
max decimal The maximum value, or decimal.MaxValue if this should not be tested.
Résultat System

ValidateRangeAttribute() public méthode

Initializes an decimal-based range validator.
public ValidateRangeAttribute ( decimal min, decimal max, string errorMessage ) : System
min decimal The minimum value, or decimal.MinValue if this should not be tested.
max decimal The maximum value, or decimal.MaxValue if this should not be tested.
errorMessage string The error message to be displayed if the validation fails.
Résultat System

ValidateRangeAttribute() public méthode

Initializes an integer-based range validator.
public ValidateRangeAttribute ( int min, int max ) : System
min int The minimum value, or int.MinValue if this should not be tested.
max int The maximum value, or int.MaxValue if this should not be tested.
Résultat System

ValidateRangeAttribute() public méthode

Initializes an integer-based range validator.
public ValidateRangeAttribute ( int min, int max, string errorMessage ) : System
min int The minimum value, or int.MinValue if this should not be tested.
max int The maximum value, or int.MaxValue if this should not be tested.
errorMessage string The error message to be displayed if the validation fails.
Résultat System

ValidateRangeAttribute() public méthode

Initializes a string-based range validator.
public ValidateRangeAttribute ( string min, string max ) : System
min string The minimum value, or String.Empty if this should not be tested.
max string The maximum value, or String.Empty if this should not be tested.
Résultat System

ValidateRangeAttribute() public méthode

Initializes a string-based range validator.
public ValidateRangeAttribute ( string min, string max, string errorMessage ) : System
min string The minimum value, or String.Empty if this should not be tested.
max string The maximum value, or String.Empty if this should not be tested.
errorMessage string The error message to be displayed if the validation fails.
Résultat System