Make date format validation stricter

Change-Id: Ib7903e0bb93bf5809f2314285ff631f2caf2bf32
This commit is contained in:
Ilya Shakhat 2014-12-26 13:44:44 +03:00
parent 3207279faf
commit ac99336407

View File

@ -35,8 +35,7 @@
"type": "string"
},
"end_date": {
"type": ["string", "null"],
"pattern": "^20\\d{2}-\\w{3}-[0-3]\\d$"
"$ref": "#/definitions/date_format"
}
},
"required": ["company_name", "end_date"],
@ -58,8 +57,7 @@
"type": "string"
},
"end_date": {
"type": "string",
"pattern": "^20\\d{2}-\\w{3}-[0-3]\\d$"
"$ref": "#/definitions/date_format"
}
},
"required": ["release_name", "end_date"],
@ -201,9 +199,6 @@
"type": "string"
}
},
"voting_date": {
"type": "string"
},
"project_types": {
"type": "array",
"items": {
@ -231,5 +226,11 @@
"additionalProperties": false
}
}
},
"definitions": {
"date_format": {
"type": ["string", "null"],
"pattern": "^20\\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[0-3]\\d$"
}
}
}