C# Class Castle.Components.Validator.AbstractValidator

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

GetFieldOrPropertyValue ( object instance, string fieldOrPropertyName ) : object

Obtains the value of a property or field on a specific instance.

Initialize ( IValidatorRegistry validationRegistry, PropertyInfo property ) : void

Implementors should perform any initialization logic

IsValid ( object instance ) : bool

Implementors should perform the actual validation upon the property value

IsValid ( object instance, object fieldValue ) : bool

Implementors should perform the actual validation upon the property value

Méthodes protégées

Méthode Description
BuildErrorMessage ( ) : string

Builds the error message.

GetString ( string key ) : string

Gets the string from resource

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

GetFieldOrPropertyValue() public méthode

Obtains the value of a property or field on a specific instance.
public GetFieldOrPropertyValue ( object instance, string fieldOrPropertyName ) : object
instance object The instance to inspect.
fieldOrPropertyName string The name of the field or property to inspect.
Résultat object

GetString() protected méthode

Gets the string from resource
protected GetString ( string key ) : string
key string The key.
Résultat string

Initialize() public méthode

Implementors should perform any initialization logic
public Initialize ( IValidatorRegistry validationRegistry, PropertyInfo property ) : void
validationRegistry IValidatorRegistry
property System.Reflection.PropertyInfo The target property
Résultat void

IsValid() public méthode

Implementors should perform the actual validation upon the property value
public IsValid ( object instance ) : bool
instance object The target type instance
Résultat bool

IsValid() public abstract méthode

Implementors should perform the actual validation upon the property value
public abstract 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