[ { "description": "formatMinimum in the property", "schema": { "type": "object", "properties": { "finalDate": { "type": "string", "format": "date", "formatMinimum": {"$data": "1/laterThan"} }, "laterThan": {} } }, "tests": [ { "description": "before the minimum date is invalid", "data": { "finalDate": "2014-12-03", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is valid", "data": { "finalDate": "2015-08-17", "laterThan": "2015-08-17" }, "valid": true }, { "description": "after the minimum date is valid", "data": { "finalDate": "2015-11-09", "laterThan": "2015-08-17" }, "valid": true }, { "description": "fails if value of formatMinimum is not string", "data": { "finalDate": "2016-11-09", "laterThan": 2015 }, "valid": false } ] }, { "description": "formatMinimum in the property with formatExclusiveMinimum", "schema": { "type": "object", "properties": { "finalDate": { "type": "string", "format": "date", "formatExclusiveMinimum": {"$data": "1/laterThan"} }, "laterThan": {} } }, "tests": [ { "description": "before the minimum date is still invalid", "data": { "finalDate": "2014-12-03", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is invalid", "data": { "finalDate": "2015-08-17", "laterThan": "2015-08-17" }, "valid": false }, { "description": "after the minimum date is still valid", "data": { "finalDate": "2015-11-09", "laterThan": "2015-08-17" }, "valid": true } ] }, { "description": "formatMinimum with format in the property", "schema": { "type": "object", "properties": { "when": { "type": "string", "format": {"$data": "1/whenFormat"}, "formatMinimum": "2015-08-17" }, "whenFormat": {} } }, "tests": [ { "description": "before the minimum date is invalid", "data": { "when": "2014-12-03", "whenFormat": "date" }, "valid": false }, { "description": "boundary point is valid", "data": { "when": "2015-08-17", "whenFormat": "date" }, "valid": true }, { "description": "after the minimum date is valid", "data": { "when": "2015-11-09", "whenFormat": "date" }, "valid": true } ] }, { "description": "formatMinimum with format in the property and with formatExclusiveMinimum", "schema": { "type": "object", "properties": { "when": { "type": "string", "format": {"$data": "1/whenFormat"}, "formatExclusiveMinimum": "2015-08-17" }, "whenFormat": {} } }, "tests": [ { "description": "before the minimum date is still invalid", "data": { "when": "2014-12-03", "whenFormat": "date" }, "valid": false }, { "description": "boundary point is invalid", "data": { "when": "2015-08-17", "whenFormat": "date" }, "valid": false }, { "description": "after the minimum date is still valid", "data": { "when": "2015-11-09", "whenFormat": "date" }, "valid": true } ] }, { "description": "formatMinimum and format in the properties", "schema": { "type": "object", "properties": { "when": { "type": "string", "format": {"$data": "1/whenFormat"}, "formatMinimum": {"$data": "1/laterThan"} }, "whenFormat": {}, "laterThan": {} } }, "tests": [ { "description": "before the minimum date is invalid", "data": { "when": "2014-12-03", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is valid", "data": { "when": "2015-08-17", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": true }, { "description": "after the minimum date is valid", "data": { "when": "2015-11-09", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": true } ] }, { "description": "formatMinimum and format in the properties with formatExclusiveMinimum", "schema": { "type": "object", "properties": { "when": { "type": "string", "format": {"$data": "1/whenFormat"}, "formatExclusiveMinimum": {"$data": "1/laterThan"} }, "whenFormat": {}, "laterThan": {} } }, "tests": [ { "description": "before the minimum date is still invalid", "data": { "when": "2014-12-03", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is invalid", "data": { "when": "2015-08-17", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": false }, { "description": "after the minimum date is still valid", "data": { "when": "2015-11-09", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": true } ] }, { "description": "formatExclusiveMinimum in the properties", "schema": { "properties": { "finalDate": { "format": "date", "formatExclusiveMinimum": {"$data": "1/laterThan"} }, "laterThan": {} } }, "tests": [ { "description": "before the minimum date is invalid", "data": { "finalDate": "2014-12-03", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is invalid", "data": { "finalDate": "2015-08-17", "laterThan": "2015-08-17" }, "valid": false }, { "description": "after the minimum date is valid", "data": { "finalDate": "2015-11-09", "laterThan": "2015-08-17" }, "valid": true }, { "description": "fails if value of formatExclusiveMinimum is not string", "data": { "finalDate": "2015-11-09", "laterThan": 2015 }, "valid": false } ] }, { "description": "format and formatExclusiveMinimum in the properties", "schema": { "properties": { "when": { "format": {"$data": "1/whenFormat"}, "formatExclusiveMinimum": {"$data": "1/laterThan"} }, "laterThan": {}, "whenFormat": {} } }, "tests": [ { "description": "before the minimum date is invalid", "data": { "when": "2014-12-03", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": false }, { "description": "boundary point is invalid", "data": { "when": "2015-08-17", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": false }, { "description": "after the minimum date is valid", "data": { "when": "2015-11-09", "whenFormat": "date", "laterThan": "2015-08-17" }, "valid": true }, { "description": "fails if value of formatExclusiveMinimum is not string", "data": { "when": "2015-11-09", "whenFormat": "date", "laterThan": 2015 }, "valid": false } ] } ]