Skip to main content

Contest special hours validation rules for dates, descriptions, closure status, and time constraints

note

Additional preconditions for all listed validations:

  • $.contestDetails.value.specialHours is present
  • The value of $.contestDetails.value.specialHours is not null

Dates

DateInRangeHasNoCorrespondingDaySpecified

Preconditions
closed is false
Date range is 7 days or less
DefinitionSeverityAPISampleMode
Validate that each date in a range has a corresponding day specified
WARNING
POST
Link
S

EndDateNotWithinRange

DefinitionSeverityAPISampleMode
Validate that the year in endDate is not more than ten (10) years (plus/minus) from the current (system) date/time
VIOLATION
POST
S

StartDateNotWithinRange

DefinitionSeverityAPISampleMode
Validate that the year in startDate is not more than ten (10) years (plus/minus) from the current (system) date/time
VIOLATION
POST
S

SpecialHoursStartDateOccursBeforeLocationOpeningDate

Preconditions
locationStatus.status is OPENING_SOON
Special hours closed is false or not present
DefinitionSeverityAPISampleMode
Validate that added special hours do not possess a startDate that occurs before the openingDate
VIOLATION
PUT
S
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
DefinitionSeverityAPISampleMode
Validate that special hours do not possess a startDate that occurs during the timeframe when location status is TEMPORARILY_CLOSED
VIOLATION
PUT
S
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

DefinitionSeverityAPISampleMode
Validate that endDate is not before startDate
VIOLATION
POST
S

SpecialHoursDateRangeExceedsNinetyDays

DefinitionSeverityAPISampleMode
Validate that the quantity of days derived from startDate and endDate, for one (1) Special Hours listing, is not greater than 90 days
WARNING
POST
Link
S

SpecialHoursDatesMustNotOverlap

DefinitionSeverityAPISampleMode
Validate that listed dates do not overlap
VIOLATION
POST
Link
S

SpecialHoursEndDateMustBePresent

Preconditions
specialHours is present
DefinitionSeverityAPISampleMode
Validate that endDate is present
VIOLATION
POST
Link
S

SpecialHoursStartDateMustBePresent

Preconditions
specialHours is present
DefinitionSeverityAPISampleMode
Validate that startDate is present
VIOLATION
POST
Link
S

Day

DayAndTimesMustBePresentWhenNotClosed

DefinitionSeverityAPISampleMode
Validate that day and times are present when closed is false
VIOLATION
POST
Link
S

SpecialHoursDayMustBeValid

DefinitionSeverityAPISampleMode
Validate that day value is valid
VIOLATION
POST
Link
S

SpecialHoursDayMustBeDistinct

DefinitionSeverityAPISampleMode
Validate that each day is distinct
VIOLATION
POST
S

SpecifiedDayMustCoincideWithDateInRange

DefinitionSeverityAPISampleMode
Validate that a day value coincides with at least one date on or between startDate and endDate
VIOLATION
POST
Link
S

Descriptions

SpecialHoursDescriptionsTextShouldNotMatch

DefinitionSeverityAPISampleMode
Validate that text does not match among different locale values
WARNING
POST
S

SpecialHoursDescriptionsTextMustNotExceedMaximum

DefinitionSeverityAPISampleMode
Validate that text length does not exceed a maximum value (255)
VIOLATION
POST
S

SpecialHoursDescriptionsTextLengthMustExceedMinimum

DefinitionSeverityAPISampleMode
Validate that text length exceeds a minimum value (5)
VIOLATION
POST
S

SpecialHoursDescriptionsTextMustNotIncludeVulgarWord

DefinitionSeverityAPISampleMode
Validate that text does not include a vulgar word
VIOLATION
POST
A

SpecialHoursLocaleMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that locale is not an empty string
VIOLATION
POST
S

SpecialHoursLocaleMustBeDistinct

DefinitionSeverityAPISampleMode
Validate that each locale is distinct
VIOLATION
POST
S

SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale

DefinitionSeverityAPISampleMode
Validate that at least one (1) supported locale is present
VIOLATION
POST
Link
S

SpecialHoursDescriptionsLocaleMustBeValid

DefinitionSeverityAPISampleMode
Validate that locale is valid
VIOLATION
POST
Link
S

SpecialHoursDescriptionsTextMustNotBeDummyCharacters

DefinitionSeverityAPISampleMode
Validate that text is not exclusively dummy characters
VIOLATION
POST
Link
S

SpecialHoursDescriptionsTextHasSuspectedUnintentionalSequentialWordRepetition

DefinitionSeverityAPISampleMode
Validate that text does not include an unintentional repetitive sequence of words
WARNING
POST
S

SpecialHoursIncludesUnsupportedLocale

DefinitionSeverityAPISampleMode
Validate that an unsupported locale value is not present
WARNING
POST
Link
S

SpecialHoursDescriptionsTextMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that text is not an empty string
VIOLATION
POST
S

SpecialHoursDescriptionsTextMustNotIncludeURL

DefinitionSeverityAPISampleMode
Validate that text does not include a URL
VIOLATION
POST
Link
S

SpecialHoursDescriptionsTextMustNotBeEntirelyNumeric

DefinitionSeverityAPISampleMode
Validate that the text value is not entirely numeric
VIOLATION
POST
S

SpecialHoursDescriptionsListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST
S

SpecialHoursDescriptionsTextMustBePresent

Preconditions
descriptions is present
DefinitionSeverityAPISampleMode
Validate that text is present
VIOLATION
POST
S

SpecialHoursDescriptionsLocaleMustBePresent

Preconditions
descriptions is present
DefinitionSeverityAPISampleMode
Validate that SpecialHoursDescriptionsRequiresAtLeastOneSupportedLocale is present
VIOLATION
POST
S

SpecialHoursDescriptionsTextHasUnsupportedCharacter

DefinitionSeverityAPISampleMode
Validate that text does not include an unsupported character
VIOLATION
POST
Link
S

Hours by Day

HoursByDayMustNotBePresentWhenClosed

DefinitionSeverityAPISampleMode
Validate that hoursByDay are not present when closed is true
VIOLATION
POST
Link
S

HoursByDayMustBePresentWhenNotClosed

DefinitionSeverityAPISampleMode
Validate that hoursByDay are present when closed is false or not present
VIOLATION
POST
S

SpecialHoursDayMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that day is not an empty string
VIOLATION
POST
S

SpecialHoursHoursByDayListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST
S

Special Hours

SpecialHoursListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST
S

CountOfValuesInSpecialHoursListExceedsThreshold

DefinitionSeverityAPISampleMode
Validate that the count of items in specialHours does not exceed fifty (50)
VIOLATION
POST
S

Times

SpecialHoursDaysTimesMustNotMatch

DefinitionSeverityAPISampleMode
Validate that listed times do not match
VIOLATION
POST
S

SpecialHoursDaysTimesMustNotOverlap

DefinitionSeverityAPISampleMode
Validate that listed times during a day do not overlap
VIOLATION
POST
S

SpecialHoursTimesStartTimeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that startTime is not an empty string
VIOLATION
POST
S

SpecialHoursTimesEndTimeMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that endTime is not an empty string
VIOLATION
POST
S

SpecialHoursStartTimeMustNotMatchEndTime

DefinitionSeverityAPISampleMode
Validate that startTime formatting is valid
VIOLATION
POST
Link
S

SpecialHoursStartTimeMustHaveValidFormat

DefinitionSeverityAPISampleMode
Validate that startTime formatting is valid
VIOLATION
POST
Link
S

SpecialHoursEndTimeMustHaveValidFormat

DefinitionSeverityAPISampleMode
Validate that endTime formatting is valid
VIOLATION
POST
Link
S

SpecialHoursHourByDayTimesListMustNotIncludeNulls

DefinitionSeverityAPISampleMode
Validate that a list does not include null
VIOLATION
POST
S

SpecialHoursTimesMustBePresent

Preconditions
specialHours[*].hoursByDay[*] is present
DefinitionSeverityAPISampleMode
Validate that times is present
VIOLATION
POST
S