-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
We need to support relative validation on json-schema for date format.
Is there any existing support where relative validations are supported for 'date' or 'date-time' formats ?, as the current schema supports only absolute validation with formatMinimum and formatMaximum.
Something like below:
{
type: 'string',
format: 'date',
formatMinimum: '2019-08-16',
formatMaximum: '2022-08-16',
relativeMinimumDate: -50, // -ve for current day - number of days
relativeMaximumDate: 20, // +ve for current day + number of days
// considering the above example, input date should be between last 50 days to coming 20 days.
}
relative minimum and relative maximum format would validate on date relatively example: last 1 year, last 20 days, last 12 months etc
matt-morrismatt-morris
Metadata
Metadata
Assignees
Labels
No labels