C# Class Castle.Components.Validator.SetValidator

Inheritance: 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.

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.

Méthodes protégées

Méthode Description
BuildErrorMessage ( ) : string

Builds the error message.

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 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.
protected BuildErrorMessage ( ) : string
Résultat string

IsValid() public méthode

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

SetValidator() public méthode

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

SetValidator() public méthode

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