Skip to main content

Validation rules for asset intent including validity, organization type restrictions, and photo size requirements

Intent

IntentNotValidForUseByOrgType

Preconditions
intent is COVER_PHOTO
DefinitionSeverityAPISampleMode
Validate that orgId resolves to organization that is location owner
VIOLATION
POST_AND_PUT
Link
S

IntentMustBePresent

DefinitionSeverityAPISampleMode
Validate that intent is present
VIOLATION
POST_AND_PUT
Link
S

IntentMustNotBeEmpty

DefinitionSeverityAPISampleMode
Validate that intent is not an empty string
VIOLATION
POST_AND_PUT
S

IntentMustBeValid

DefinitionSeverityAPISampleMode
Validate that intent value is valid
VIOLATION
POST_AND_PUT
Link
S
Example Validation Report
{
"code": "VALIDATION__IntentMustBeValid",
"message": "The value '{{value}}' for field '{{field}}' is invalid. Valid values are {{validValue}}",
"context": {
"field": "intent",
"value": "private album",
"validValue": "COVER_PHOTO,GALLERY"
}
}

IntentMustBePresent

DefinitionSeverityAPISampleMode
Validate that intent is present
VIOLATION
POST_AND_PUT
S

Photos

AtLeastOnePhotoSizeMustBePresentForIntent

Preconditions
intent is COVER_PHOTO
photos is present
DefinitionSeverityAPISampleMode
Validate that at least one (1) required photo size is present for the stated Intent
VIOLATION
POST_AND_PUT
Link
S

PhotosKeyMustNotBePresent

Preconditions
intent is COVER_PHOTO
photos is present
DefinitionSeverityAPISampleMode
Validate that none of the following are present: thumbnail, small, medium and original
VIOLATION
POST_AND_PUT
Link
S

PhotosLargeMustHaveMinimumLengthForIntent

Preconditions
intent is COVER_PHOTO
photos is present
DefinitionSeverityAPISampleMode
Validate that the shortest axis has a minimum length when photo size is large
VIOLATION
POST_AND_PUT
Link
S

PhotosXLargeMustHaveMinimumLengthForIntent

Preconditions
intent is COVER_PHOTO
photos is present
DefinitionSeverityAPISampleMode
Validate that the shortest axis has a minimum length when photo size is xlarge
VIOLATION
POST_AND_PUT
Link
S

PhotosXXLargeMustHaveMinimumLengthForIntent

Preconditions
intent is COVER_PHOTO
photos is present
DefinitionSeverityAPISampleMode
Validate that the shortest axis has a minimum length when photo size is xxlarge
VIOLATION
POST_AND_PUT
Link
S

PhotosLargeOrXlargeOrXXLargeMustBePresent

Preconditions
intent is GALLERY
photos is present
DefinitionSeverityAPISampleMode
Validate that large, xlarge, or xxlarge is present
VIOLATION
POST_AND_PUT
Link
S