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

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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
BuildErrorMessage ( ) : string

Builds the error message when the property value is not unique

Private Methods

Méthode Description
CheckUniqueness ( ISession session, object instance ) : object

Method Details

ApplyBrowserValidation() public méthode

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.
Résultat void

BuildErrorMessage() protected méthode

Builds the error message when the property value is not unique
protected BuildErrorMessage ( ) : string
Résultat string

IsUniqueValidator() public méthode

Initializes a new instance of the IsUniqueValidator class.
public IsUniqueValidator ( ) : System
Résultat System

IsValid() public méthode

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