Checks if the given value is a valid Dayjs duration not longer than minimum.
minimum
The minimum can be given as either:
"PT1H"
{ hour: 1, minute: 30 }
[1, 'hour]
// Ensure the value is a duration at least 1 hour long@MinDuration([1, 'hour'], { inclusive: true })value: Duration Copy
// Ensure the value is a duration at least 1 hour long@MinDuration([1, 'hour'], { inclusive: true })value: Duration
The minimum allowed value.
Optional
Accepts the following options (in addition to generic class-validator options):
inclusive: boolean = false
Checks if the given value is a valid Dayjs duration not longer than
minimum
.The minimum can be given as either:
"PT1H"
{ hour: 1, minute: 30 }
[1, 'hour]
Example