DateTimeSchemaExtensions extension

Extensions for CodecSchema<String, DateTime> to add date range validation.

on

Methods

max(DateTime maxDate) → CodecSchema<String, DateTime>

Available on CodecSchema<String, DateTime>, provided by the DateTimeSchemaExtensions extension

Constrains the date to be on or before maxDate (inclusive).
min(DateTime minDate) → CodecSchema<String, DateTime>

Available on CodecSchema<String, DateTime>, provided by the DateTimeSchemaExtensions extension

Constrains the date to be on or after minDate (inclusive).