Error message.
Start date boundary. If null or undefined, there is no start boundary.
End date boundary. If null or undefined, there is no end boundary.
Optional custom transform function, to convert the testing value into date object.
Optional Today's date to be used as reference validating ranges. If not provided, the start of the day in the current runtime timezone will be used.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Equal validation rule.
Error message.
Matcher object, or a custom equality predicate function, fn(val) returning true|false (equal / not equal).
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Exclude validation rule.
Error message.
List of exclusions.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Include validation rule.
Error message.
List of inclusions.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Length validation rule.
Error message.
Minimal length. If null or undefined, there is no min length.
Maximal length. If null or undefined, there is no max length.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Pattern validation rule.
Error message.
Regular expression.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Present validation rule.
Error message.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Range validation rule.
Error message.
Minimal boundary. If null or undefined, there is no min boundary.
Maximal boundary. If null or undefined, there is no max boundary.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Year validation rule.
Error message.
Start year boundary. If null or undefined, there is no start boundary.
End year boundary. If null or undefined, there is no end boundary.
validation function, fn(value) => true|string, returns true when valid, error message otherwise.
Generated using TypeDoc
Date validation rule. The value passed into the validation function must be a Date object or ISO date string: yyyy-mm-dd. Or a custom transform function can be used to perform custom string to date conversion.