Table of Contents

Class DateTimeLessThanValidator

Namespace
CloudyWing.FormValidators
Assembly
CloudyWing.FormValidators.dll

Validate that an date time value is less than another column value.

public sealed class DateTimeLessThanValidator : LessThanValidator<DateTime>, IFormValidator
Inheritance
DateTimeLessThanValidator
Implements
Inherited Members

Constructors

DateTimeLessThanValidator(string, string, string, string, bool, Func<string, string, string, string, bool, string>)

Initializes a new instance of the DateTimeLessThanValidator class.

public DateTimeLessThanValidator(string column, string value, string comparisonColumn, string comparisonValue, bool allowedEqual = true, Func<string, string, string, string, bool, string> customErrorMessageAccessor = null)

Parameters

column string

The column.

value string

The value.

comparisonColumn string

The comparison column.

comparisonValue string

The comparison value.

allowedEqual bool

if set to true [allowed equal].

customErrorMessageAccessor Func<string, string, string, string, bool, string>

The custom error message accessor. The arguments are column, value, comparison column, comparison value, allowed equal.

Methods

TryParse(string, out DateTime)

Tries the parse.

protected override bool TryParse(string value, out DateTime result)

Parameters

value string

The value.

result DateTime

The result.

Returns

bool

Parse value to type T result.