C# Class Castle.Components.Validator.SameAsValidator

Validates that the content has the same value as the property informed.
Inheritance: AbstractValidator
Mostrar archivo 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

Validates that the fieldValue is the same as the property set through the constructor.

SameAsValidator ( string propertyToCompare ) : System.Collections

Initializes a new instance of the SameAsValidator class.

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

IsValid() public method

Validates that the fieldValue is the same as the property set through the constructor.
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

SameAsValidator() public method

Initializes a new instance of the SameAsValidator class.
public SameAsValidator ( string propertyToCompare ) : System.Collections
propertyToCompare string The property to compare.
return System.Collections