[ { "description": "formatMinimum validation with date format", "schema": { "type": "string", "format": "date", "formatMinimum": "2015-08-17" }, "tests": [ { "description": "after the minimum date is valid", "data": "2015-11-09", "valid": true }, { "description": "boundary point is valid", "data": "2015-08-17", "valid": true }, { "description": "before the minimum date is invalid", "data": "2014-12-03", "valid": false } ] }, { "description": "formatExclusiveMinimum validation with date format", "schema": { "type": "string", "format": "date", "formatExclusiveMinimum": "2015-08-17" }, "tests": [ { "description": "after the minimum date is still valid", "data": "2015-11-09", "valid": true }, { "description": "boundary point is invalid", "data": "2015-08-17", "valid": false }, { "description": "before the minimum date is still invalid", "data": "2014-12-03", "valid": false } ] }, { "description": "formatMinimum validation with time format", "schema": { "type": "string", "format": "time", "formatMinimum": "13:15:17.000Z" }, "tests": [ { "description": "time after the minimum time is valid", "data": "15:11:09.000Z", "valid": true }, { "description": "boundary point is valid", "data": "13:15:17.000Z", "valid": true }, { "description": "time before the minimum time is invalid, timezone is taken into account", "data": "13:15:17.000+01:00", "valid": false }, { "description": "boundary point is valid, timezone is taken into account", "data": "14:15:17.000+01:00", "valid": true }, { "description": "time after the minimum time is valid, timezone is taken into account", "data": "14:20:17.000+01:00", "valid": true }, { "description": "time before the minimum time is invalid", "data": "10:33:55.000Z", "valid": false } ] }, { "description": "formatExclusiveMinimum validation with time format", "schema": { "type": "string", "format": "time", "formatExclusiveMinimum": "13:15:17.000Z" }, "tests": [ { "description": "time after the minimum time is still valid", "data": "15:11:09.000Z", "valid": true }, { "description": "boundary point is invalid", "data": "13:15:17.000Z", "valid": false }, { "description": "boundary point is invalid, timezone is taken into account", "data": "14:15:17.000+01:00", "valid": false }, { "description": "boundary point is invalid, no timezone is ok too", "data": "13:15:17.000", "valid": false }, { "description": "time before the minimum time is still invalid", "data": "10:33:55.000Z", "valid": false } ] }, { "description": "formatMinimum validation with date-time format", "schema": { "type": "string", "format": "date-time", "formatMinimum": "2015-08-17T13:15:17.000Z" }, "tests": [ { "description": "date after the minimum date is valid", "data": "2015-11-09T13:15:17.000Z", "valid": true }, { "description": "same date, time after the minimum time is valid", "data": "2015-08-17T15:11:09.000Z", "valid": true }, { "description": "boundary point is valid", "data": "2015-08-17T13:15:17.000Z", "valid": true }, { "description": "same date, time before the minimum time is invalid", "data": "2015-08-17T10:33:55.000Z", "valid": false }, { "description": "date before the minimum date is invalid", "data": "2014-12-03T13:15:17.000Z", "valid": false } ] }, { "description": "formatExclusiveMinimum validation with date-time format", "schema": { "type": "string", "format": "date-time", "formatExclusiveMinimum": "2015-08-17T13:15:17.000Z" }, "tests": [ { "description": "date after the minimum date is still valid", "data": "2015-11-09T13:15:17.000Z", "valid": true }, { "description": "same date, time after the minimum time is still valid", "data": "2015-08-17T15:11:09.000Z", "valid": true }, { "description": "boundary point is invalid", "data": "2015-08-17T13:15:17.000Z", "valid": false }, { "description": "same date, time before the minimum time is still invalid", "data": "2015-08-17T10:33:55.000Z", "valid": false }, { "description": "date before the minimum date is still invalid", "data": "2014-12-03T13:15:17.000Z", "valid": false } ] }, { "description": "formatMinimum validation with iso-time format", "schema": { "type": "string", "format": "iso-time", "formatMinimum": "13:15:17.000Z" }, "tests": [ { "description": "time after the minimum time is valid", "data": "15:11:09.000Z", "valid": true }, { "description": "boundary point is valid", "data": "13:15:17.000Z", "valid": true }, { "description": "time before the minimum time is invalid, timezone is ignored", "data": "13:15:16.000+01:00", "valid": false }, { "description": "boundary point is valid, timezone is ignored", "data": "13:15:17.000+01:00", "valid": true }, { "description": "time after the minimum time is valid, timezone is ignored", "data": "13:15:18.000+01:00", "valid": true }, { "description": "time before the minimum time is invalid", "data": "10:33:55.000Z", "valid": false } ] }, { "description": "formatExclusiveMinimum validation with iso-time format", "schema": { "type": "string", "format": "iso-time", "formatExclusiveMinimum": "13:15:17.000Z" }, "tests": [ { "description": "time after the minimum time is still valid", "data": "15:11:09.000Z", "valid": true }, { "description": "boundary point is invalid", "data": "13:15:17.000Z", "valid": false }, { "description": "boundary point is invalid, timezone is ignored", "data": "13:15:17.000+01:00", "valid": false }, { "description": "boundary point is invalid, no timezone is ok too", "data": "13:15:17.000", "valid": false }, { "description": "time before the minimum time is still invalid", "data": "10:33:55.000Z", "valid": false } ] }, { "description": "formatMinimum validation with iso-date-time format", "schema": { "type": "string", "format": "iso-date-time", "formatMinimum": "2015-08-17T13:15:17.000Z" }, "tests": [ { "description": "date after the minimum date is valid", "data": "2015-11-09T13:15:17.000Z", "valid": true }, { "description": "same date, time after the minimum time is valid", "data": "2015-08-17T15:11:09.000Z", "valid": true }, { "description": "boundary point is valid", "data": "2015-08-17T13:15:17.000Z", "valid": true }, { "description": "same date, time before the minimum time is invalid", "data": "2015-08-17T10:33:55.000Z", "valid": false }, { "description": "date before the minimum date is invalid", "data": "2014-12-03T13:15:17.000Z", "valid": false } ] }, { "description": "formatExclusiveMinimum validation with iso-date-time format", "schema": { "type": "string", "format": "iso-date-time", "formatExclusiveMinimum": "2015-08-17T13:15:17.000Z" }, "tests": [ { "description": "date after the minimum date is still valid", "data": "2015-11-09T13:15:17.000Z", "valid": true }, { "description": "same date, time after the minimum time is still valid", "data": "2015-08-17T15:11:09.000Z", "valid": true }, { "description": "boundary point is invalid", "data": "2015-08-17T13:15:17.000Z", "valid": false }, { "description": "same date, time before the minimum time is still invalid", "data": "2015-08-17T10:33:55.000Z", "valid": false }, { "description": "date before the minimum date is still invalid", "data": "2014-12-03T13:15:17.000Z", "valid": false } ] } ]