C# Class Castle.Components.Validator.SetValidator

Inheritance: AbstractValidator
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
ApplyBrowserValidation ( BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, IDictionary attributes, string target ) : void

Applies the browser validation by setting up one or more input rules on IBrowserValidationGenerator.

IsValid ( object instance, object fieldValue ) : bool

Validate that the property value matches the set requirements.

SetValidator ( ) : System

Initializes a set-based validator with an empty set.

SetValidator ( Type type ) : System

Initializes a set-based validator.

Protected Methods

Method Description
BuildErrorMessage ( ) : string

Builds the error message.

Method Details

ApplyBrowserValidation() public method

Applies the browser validation by setting up one or more input rules on IBrowserValidationGenerator.
public ApplyBrowserValidation ( BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, IDictionary attributes, string target ) : void
config BrowserValidationConfiguration The config.
inputType InputElementType Type of the input.
generator IBrowserValidationGenerator The generator.
attributes IDictionary The attributes.
target string The target.
return void

BuildErrorMessage() protected method

Builds the error message.
protected BuildErrorMessage ( ) : string
return string

IsValid() public method

Validate that the property value matches the set requirements.
public IsValid ( object instance, object fieldValue ) : bool
instance object The target type instance
fieldValue object The property/field value. It can be null.
return bool

SetValidator() public method

Initializes a set-based validator with an empty set.
public SetValidator ( ) : System
return System

SetValidator() public method

Initializes a set-based validator.
public SetValidator ( Type type ) : System
type System.Type The of an enum class. /// The enum names will be added to the contents of the set.
return System