Location special hours validation rules for dates, descriptions, closure status, and time constraints
Cross-feature
SpecialHoursDescriptions_ExpectedLangTagForCountryNotPresent
| Preconditions |
|---|
structuredAddress is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that at least one (1) primary language tag is present corresponding to a language expected to be spoken in the Country identified by countryCode in structuredAddress |
SpecialHoursDescriptions_ExpectedLangTagForDerivedCountryNotPresent
| Preconditions |
|---|
displayPoint is present |
structuredAddress is not present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that at least one (1) primary language tag is present corresponding to a language expected to be spoken in the Country derived from reverse geocoding Display Point coordinates |
SpecialHours_ExpectedRegionSubtagForDerivedCountryNotPresent
| Preconditions |
|---|
displayPoint is present |
mainAddress is not present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that at least one (1) Region Subtag is present that corresponds with a country derived from displayPoint |
SpecialHours_ExpectedRegionSubtagForCountryNotPresent
| Preconditions |
|---|
structuredAddress is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that at least one (1) Region Subtag is present that corresponds with countryCode in structuredAddress |
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 |
Example Validation Report
{
"code": "VALIDATION__DateInRangeHasNoCorrespondingDaySpecified",
"severity": "VIOLATION",
"message": "Special Hours date range includes date with no corresponding '{{value}}' day specified",
"context": {
"value": "TUESDAY"
},
"details": {
"createdDate": "2026-06-02T11:36:02.00Z",
"expected": [
{
"field": "$.locationDetails.specialHours[0].hoursByDay.day",
"value": "TUESDAY"
}
],
"compared": [],
"submitted": []
}
}
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 |
Example Validation Report
{
"code": "VALIDATION__EndDateNotWithinRange",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'endDate' is not within an acceptable range",
"context": {
"value": "0201-12-24"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].endDate",
"value": "0201-12-24"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
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 |
Example Validation Report
{
"code": "VALIDATION__StartDateNotWithinRange",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'startDate' is not within an acceptable range",
"context": {
"value": "0201-12-27"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].startDate",
"value": "0201-12-27"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
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 |
Example Validation Report
{
"code": "VALIDATION__EndDateMustNotBeBeforeStartDate",
"severity": "VIOLATION",
"message": "Special Hours `startDate` must be before `endDate`",
"details": {
"createdDate": "2026-02-10T11:36:02.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours[0].endDate",
"value": "2014-12-31"
}
],
"compared": [],
"expected": []
}
}
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 |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursDateRangeExceedsNinetyDays",
"severity": "WARNING",
"message": "Listed date range is more than ninety (90) days"
}
SpecialHoursDatesMustNotOverlap
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that listed dates do not overlap | Link |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursDatesMustNotOverlap",
"severity": "VIOLATION",
"message": "Date ranges overlap among listings"
}
SpecialHoursEndDateMustBePresent
| Preconditions |
|---|
specialHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that endDate is present | Link |
SpecialHoursEndDateMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that formatting of endDate is valid |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursEndDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'endDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours.endDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}
SpecialHoursStartDateMustBePresent
| Preconditions |
|---|
specialHours is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that startDate is present | Link |
SpecialHoursStartDateMustHaveValidFormat
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that formatting of startDate is valid |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursStartDateMustHaveValidFormat",
"severity": "VIOLATION",
"message": "Value '{{value}}' in field 'startDate' is not valid",
"context": {
"value": "01-10-2025"
},
"details": {
"createdDate": "2026-08-01T21:00:00.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours.startDate",
"value": "01-10-2025"
}
],
"compared": [],
"expected": []
}
}
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 |
Example Validation Report
{
"code": "VALIDATION__SpecifiedDayMustCoincideWithDateInRange",
"severity": "VIOLATION",
"message": "'{{value}}' in field '{{field}}' is not coincident with any date in range",
"context": {
"field": "day",
"value": "FRIDAY"
},
"details": {
"createdDate": "2026-02-10T11:36:02.00Z",
"submitted": [
{
"field": "$.locationDetails.specialHours[0].hoursByDay[0].day",
"value": "FRIDAY"
}
],
"compared": [],
"expected": []
}
}
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 |
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 |
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 |
SpecialHoursNestedDescriptionsMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that specialHours[].descriptions is not an empty array |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursNestedDescriptionsMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "descriptions"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].descriptions",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
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
CountOfValuesInSpecialHoursListExceedsThreshold
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the count of items in specialHours does not exceed fifty (50) |
SpecialHoursListMustNotIncludeNulls
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that a list does not include null |
SpecialHoursMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that specialHours is not an empty array |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "specialHours"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
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 |
SpecialHoursNestedTimesMustNotBeEmptyArray
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that specialHours[].hoursByDay[].times is not an empty array |
Example Validation Report
{
"code": "VALIDATION__SpecialHoursNestedTimesMustNotBeEmptyArray",
"message": "'{{field}}' must be omitted or contain at least one element; empty arrays are not allowed.",
"severity": "VIOLATION",
"context": {
"field": "times"
},
"details": {
"compared": [],
"expected": [],
"submitted": [
{
"field": "$.locationDetails.specialHours[0].hoursByDay[0].times",
"value": "[]"
}
],
"createdDate": "2026-03-03T13:58:43.946Z"
}
}
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 does not match endTime | 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 |
Example Validation Report
{
"code" : "VALIDATION__SpecialHoursTimesMustBePresent",
"severity": "VIOLATION",
"message" : "'{{field}}' must be present",
"context": {
"field": "times"
}
}