C# Class Castle.Components.Validator.ValidateLengthAttribute

Inheritance: Castle.Components.Validator.AbstractValidationAttribute
ファイルを表示 Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
Build ( ) : IValidator

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

ValidateLengthAttribute ( int exactLength ) : System

Initializes a new exact length validator.

ValidateLengthAttribute ( int exactLength, String errorMessage ) : System

Initializes a new exact length validator.

ValidateLengthAttribute ( int minLength, int maxLength ) : System

Initializes a new range based length validator.

ValidateLengthAttribute ( int minLength, int maxLength, String errorMessage ) : System

Initializes a new range based length validator.

Method Details

Build() public method

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

ValidateLengthAttribute() public method

Initializes a new exact length validator.
public ValidateLengthAttribute ( int exactLength ) : System
exactLength int The exact length required.
return System

ValidateLengthAttribute() public method

Initializes a new exact length validator.
public ValidateLengthAttribute ( int exactLength, String errorMessage ) : System
exactLength int The exact length required.
errorMessage String The error message to be displayed if the validation fails.
return System

ValidateLengthAttribute() public method

Initializes a new range based length validator.
public ValidateLengthAttribute ( int minLength, int maxLength ) : System
minLength int The minimum length, or int.MinValue if this should not be tested.
maxLength int The maximum length, or int.MaxValue if this should not be tested.
return System

ValidateLengthAttribute() public method

Initializes a new range based length validator.
public ValidateLengthAttribute ( int minLength, int maxLength, String errorMessage ) : System
minLength int The minimum length, or int.MinValue if this should not be tested.
maxLength int The maximum length, or int.MaxValue if this should not be tested.
errorMessage String The error message to be displayed if the validation fails.
return System