Skip to main content

Contest opening hours validation rules for days, times, formats, and operational constraints

note

Additional preconditions for all listed validations:

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

Opening Hours by Day​

OpeningHoursByDayListMustNotIncludeNulls​

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

Day​

OpeningHoursDayMustBePresent​

Preconditions
openingHoursByDay is present
DefinitionSeverityAPISampleMode
Validate that day is present
VIOLATION
POST
Link
S

OpeningHoursDayMustNotBeEmpty​

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

OpeningHoursDayMustBeValid​

DefinitionSeverityAPISampleMode
Validate that day value is valid
VIOLATION
POST
Link
S

OpeningHoursDayMustBeDistinct​

DefinitionSeverityAPISampleMode
Validate that each day value is distinct
VIOLATION
POST
S

Times​

HoursAreWithin06:00To11:00Range​

DefinitionSeverityAPISampleMode
Validate that all hours are not within the range of 06:00 and 11:00
WARNING
POST
S

InsufficientOpeningHoursByDayForCategory​

Preconditions
categories is any of: restaurants, food, shopping
DefinitionSeverityAPISampleMode
Validate that at least four (4) days are present
WARNING
POST
S

MajorityOfHoursNotWithin08:00To20:00Range​

DefinitionSeverityAPISampleMode
Validate that the majority of hours fall within the range of 08:00 and 20:00
WARNING
POST
S

OpeningHoursByDayTimesListMustNotIncludeNulls​

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

OpeningHoursTimesMustBePresent​

Preconditions
openingHoursByDay is present
DefinitionSeverityAPISampleMode
Validate that times is present
VIOLATION
POST
Link
S

OpeningHoursStartTimeMustBePresent​

Preconditions
times is present
DefinitionSeverityAPISampleMode
Validate that startTime is present
VIOLATION
POST
S

OpeningHoursStartTimeMustNotBeEmpty​

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

OpeningHoursEndTimeMustBePresent​

Preconditions
times is present
DefinitionSeverityAPISampleMode
Validate that endTime is present
VIOLATION
POST
S

OpeningHoursEndTimeMustNotBeEmpty​

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

OpeningHoursStartTimeMustNotMatchEndTime​

DefinitionSeverityAPISampleMode
Validate that startTime does not match endTime
VIOLATION
POST
Link
S

OpeningHoursDaysTimesMustNotMatch​

DefinitionSeverityAPISampleMode
Validate that listed times do not match
VIOLATION
POST
Link
S

OpeningHoursDaysTimesMustNotOverlap​

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

OpeningHoursStartTimeMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that startTime formatting is valid
VIOLATION
POST
Link
S

OpeningHoursEndTimeMustHaveValidFormat​

DefinitionSeverityAPISampleMode
Validate that endTime formatting is valid
VIOLATION
POST
Link
S

ShouldBeOpenMoreThanTwoHours​

DefinitionSeverityAPISampleMode
Validate that listed times during a day total at least two (2) hours
WARNING
POST
S

ShouldBeOpenMoreThanOneHour​

DefinitionSeverityAPISampleMode
Validate that listed times during a day total at least one (1) hour
WARNING
POST
S

SuspiciousWeekendRestriction​

DefinitionSeverityAPISampleMode
Validate that days are not restricted to only SATURDAY or SUNDAY, or just those days
WARNING
POST
Link
S

SuspiciouslyShortClosureBetweenTimesInDay​

DefinitionSeverityAPISampleMode
Validate that minutes interval between times in a day is greater than threshold (15 minutes)
VIOLATION
POST
Link
S

SuspiciousWeekdayTimeVariance​

DefinitionSeverityAPISampleMode
Validate that a comparison of times between days Monday through Friday, inclusive, does not render a difference of four (4) hours
WARNING
POST
Link
S