Contest special hours validation rules for dates, descriptions, closure status, and time constraints
note
Additional preconditions for all listed validations:
$.contestDetails.value.specialHoursis present- The value of
$.contestDetails.value.specialHoursis notnull
Dates
DateInRangeHasNoCorrespondingDaySpecified
| Preconditions |
|---|
closed is false |
| Date range is 7 days or less |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each date in a range has a corresponding day specified | Link |
EndDateNotWithinRange
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the year in endDate is not more than ten (10) years (plus/minus) from the current (system) date/time |
StartDateNotWithinRange
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the year in startDate is not more than ten (10) years (plus/minus) from the current (system) date/time |
SpecialHoursStartDateOccursBeforeLocationOpeningDate
| Preconditions |
|---|
locationStatus.status is OPENING_SOON |
Special hours closed is false or not present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that added special hours do not possess a startDate that occurs before the openingDate |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateOccursBeforeLocationOpeningDate",
"severity": "VIOLATION",
"message": "Special hours `startDate` occurs when `locationStatus` is `OPENING_SOON`",
"details": {
"createdDate": "2026-08-10T11:36:02.000Z",
"submitted": [
{
"field": "$.specialHours[0]",
"value": {
"hoursByDay": [
{
"day": "THURSDAY",
"times": [
{
"startTime": "09:00",
"endTime": "12:00"
}
]
}
],
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"closed": "false",
"descriptions": [
{
"text": "Early Closing Thanksgiving Holiday (USA branches)",
"locale": "en-US"
}
]
}
}
],
"compared": [
{
"field": "$.locationDetails.locationStatus",
"value": {
"status": "OPENING_SOON",
"openingDate": "2026-11-30"
}
}
],
"expected": []
}
}
SpecialHoursStartDateOccursWhenLocationStatusIsTempClosed
| Preconditions |
|---|
locationStatus.status is TEMPORARILY_CLOSED |
Special hours closed is false or not present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that special hours do not possess a startDate that occurs during the timeframe when location status is TEMPORARILY_CLOSED |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateOccursWhenLocationStatusIsTempClosed",
"severity": "VIOLATION",
"message": "Special hours `startDate` occurs when `locationStatus` is `TEMPORARILY_CLOSED`",
"details": {
"createdDate": "2026-08-10T11:36:02.000Z",
"submitted": [
{
"field": "$.specialHours[0]",
"value": {
"hoursByDay": [
{
"day": "THURSDAY",
"times": [
{
"startTime": "09:00",
"endTime": "12:00"
}
]
}
],
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"closed": "false",
"descriptions": [
{
"text": "Early Closing Thanksgiving Holiday (USA branches)",
"locale": "en-US"
}
]
}
}
],
"compared": [
{
"field": "$.locationDetails.locationStatus",
"value": {
"status": "TEMPORARILY_CLOSED",
"closedDate": "2026-09-01",
"reopenDate": "2026-11-30"
}
}
],
"expected": []
}
}
EndDateMustNotBeBeforeStartDate
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endDate is not before startDate |
SpecialHoursDateRangeExceedsNinetyDays
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the quantity of days derived from startDate and endDate, for one (1) Special Hours listing, is not greater than 90 days | Link |
SpecialHoursDatesMustNotOverlap
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed dates do not overlap | Link |
SpecialHoursEndDateMustBePresent
| Preconditions |
|---|
specialHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endDate is present | Link |
SpecialHoursStartDateMustBePresent
| Preconditions |
|---|
specialHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startDate is present | Link |
Day
DayAndTimesMustBePresentWhenNotClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day and times are present when closed is false | Link |
SpecialHoursDayMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day value is valid | Link |
SpecialHoursDayMustBeDistinct
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each day is distinct |
SpecifiedDayMustCoincideWithDateInRange
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that a day value coincides with at least one date on or between startDate and endDate | Link |
Descriptions
SpecialHoursDescriptionsTextShouldNotMatch
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text does not match among different locale values |
SpecialHoursDescriptionsTextMustNotExceedMaximum
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text length does not exceed a maximum value (255) |
SpecialHoursDescriptionsTextLengthMustExceedMinimum
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text length exceeds a minimum value (5) |
SpecialHoursDescriptionsTextMustNotIncludeVulgarWord
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text does not include a vulgar word |
SpecialHoursLocaleMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locale is not an empty string |
SpecialHoursLocaleMustBeDistinct
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that each locale is distinct |
SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that at least one (1) supported locale is present | Link |
SpecialHoursDescriptionsLocaleMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that locale is valid | Link |
SpecialHoursDescriptionsTextMustNotBeDummyCharacters
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text is not exclusively dummy characters | Link |
SpecialHoursDescriptionsTextHasSuspectedUnintentionalSequentialWordRepetition
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text does not include an unintentional repetitive sequence of words |
SpecialHoursIncludesUnsupportedLocale
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that an unsupported locale value is not present | Link |
SpecialHoursDescriptionsTextMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text is not an empty string |
SpecialHoursDescriptionsTextMustNotIncludeURL
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text does not include a URL | Link |
SpecialHoursDescriptionsTextMustNotBeEntirelyNumeric
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the text value is not entirely numeric |
SpecialHoursDescriptionsListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
SpecialHoursDescriptionsTextMustBePresent
| Preconditions |
|---|
descriptions is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text is present |
SpecialHoursDescriptionsLocaleMustBePresent
| Preconditions |
|---|
descriptions is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale is present |
SpecialHoursDescriptionsTextHasUnsupportedCharacter
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that text does not include an unsupported character | Link |
Hours by Day
HoursByDayMustNotBePresentWhenClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that hoursByDay are not present when closed is true | Link |
HoursByDayMustBePresentWhenNotClosed
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that hoursByDay are present when closed is false or not present |
SpecialHoursDayMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that day is not an empty string |
SpecialHoursHoursByDayListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
Special Hours
SpecialHoursListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
CountOfValuesInSpecialHoursListExceedsThreshold
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the count of items in specialHours does not exceed fifty (50) |
Times
SpecialHoursDaysTimesMustNotMatch
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times do not match |
SpecialHoursDaysTimesMustNotOverlap
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed times during a day do not overlap |
SpecialHoursTimesStartTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime is not an empty string |
SpecialHoursTimesEndTimeMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime is not an empty string |
SpecialHoursStartTimeMustNotMatchEndTime
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime formatting is valid | Link |
SpecialHoursStartTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startTime formatting is valid | Link |
SpecialHoursEndTimeMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endTime formatting is valid | Link |
SpecialHoursHourByDayTimesListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
SpecialHoursTimesMustBePresent
| Preconditions |
|---|
specialHours[*].hoursByDay[*] is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that times is present |