C# Class Castle.ActiveRecord.Framework.Validators.IsUniqueValidator

Inheritance: Castle.Components.Validator.AbstractValidator
ファイルを表示 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.

IsUniqueValidator ( ) : System

Initializes a new instance of the IsUniqueValidator class.

IsValid ( object instance, object fieldValue ) : bool

Perform the check that the property value is unqiue in the table

Protected Methods

Method Description
BuildErrorMessage ( ) : string

Builds the error message when the property value is not unique

Private Methods

Method Description
CheckUniqueness ( ISession session, object instance ) : object

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 Castle.Components.Validator.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 when the property value is not unique
protected BuildErrorMessage ( ) : string
return string

IsUniqueValidator() public method

Initializes a new instance of the IsUniqueValidator class.
public IsUniqueValidator ( ) : System
return System

IsValid() public method

Perform the check that the property value is unqiue in the table
public IsValid ( object instance, object fieldValue ) : bool
instance object
fieldValue object
return bool