NoFutureDateAttribute Class

Validates that a date is not in the future.

Definition

Namespace: Common.Wpf.Attributes
Assembly: Common.Wpf.Resources (in Common.Wpf.Resources.dll) Version: 2.0.6
C#
public sealed class NoFutureDateAttribute : ValidationAttribute
Inheritance
Object    Attribute    ValidationAttribute    NoFutureDateAttribute

Remarks

This works for both DateTime and DateOnly values.

Constructors

NoFutureDateAttributeInitializes a new instance of the NoFutureDateAttribute class

Methods

FormatErrorMessageApplies formatting to an error message, based on the data field where the error occurred.
(Overrides ValidationAttributeFormatErrorMessage(String))
IsValidValidates the specified value with respect to the current validation attribute.
(Overrides ValidationAttributeIsValid(Object, ValidationContext))

See Also