C# Class Castle.Components.Validator.RegularExpressionValidator

Inheritance: AbstractValidator
Afficher le fichier Open project: nats/castle-1.0.3-mono Class Usage Examples

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 match the given regex. Null or empty values are allowed.

RegularExpressionValidator ( String expression ) : System

Initializes a new instance of the RegularExpressionValidator class.

RegularExpressionValidator ( String expression, RegexOptions options ) : System

Initializes a new instance of the RegularExpressionValidator class.

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

IsValid() public méthode

Validate that the property value match the given regex. Null or empty values are allowed.
public IsValid ( object instance, object fieldValue ) : bool
instance object
fieldValue object
Résultat bool

RegularExpressionValidator() public méthode

Initializes a new instance of the RegularExpressionValidator class.
public RegularExpressionValidator ( String expression ) : System
expression String The expression.
Résultat System

RegularExpressionValidator() public méthode

Initializes a new instance of the RegularExpressionValidator class.
public RegularExpressionValidator ( String expression, RegexOptions options ) : System
expression String The expression.
options RegexOptions The regular expression options.
Résultat System