C# Class Castle.Components.Validator.NullableDateValidator

This is a meta validator. It is only useful to test a source content before setting it on the target instance.
Inheritance: AbstractValidator
Mostrar archivo 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.

IsValid ( object instance, object fieldValue ) : bool

Checks if the fieldValue can be converted to a valid Date (so no time part). Null or empty value allowed.

Private Methods

Method Description
IsDateOnly ( System.DateTime date ) : bool

Check if only date given (so no time part)

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 BrowserValidationConfiguration The config.
inputType InputElementType Type of the input.
generator IBrowserValidationGenerator The generator.
attributes IDictionary The attributes.
target string The target.
return void

IsValid() public method

Checks if the fieldValue can be converted to a valid Date (so no time part). Null or empty value allowed.
public IsValid ( object instance, object fieldValue ) : bool
instance object The target type instance
fieldValue object The property/field value. It can be null.
return bool