Validation rules for asset intent including validity, organization type restrictions, and photo size requirements
Intent
IntentNotValidForUseByOrgType
| Preconditions |
|---|
intent is COVER_PHOTO |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that orgId resolves to organization that is location owner | Link |
IntentMustBePresent
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that intent is present | Link |
IntentMustNotBeEmpty
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that intent is not an empty string |
IntentMustBeValid
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that intent value is valid | Link |
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
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that intent is present |
Photos
AtLeastOnePhotoSizeMustBePresentForIntent
| Preconditions |
|---|
intent is COVER_PHOTO |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
| Validate that at least one (1) required photo size is present for the stated Intent | Link |
PhotosKeyMustNotBePresent
| Preconditions |
|---|
intent is COVER_PHOTO |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that none of the following are present: thumbnail, small, medium and original | Link |
PhotosLargeMustHaveMinimumLengthForIntent
| Preconditions |
|---|
intent is COVER_PHOTO |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the shortest axis has a minimum length when photo size is large | Link |
PhotosXLargeMustHaveMinimumLengthForIntent
| Preconditions |
|---|
intent is COVER_PHOTO |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the shortest axis has a minimum length when photo size is xlarge | Link |
PhotosXXLargeMustHaveMinimumLengthForIntent
| Preconditions |
|---|
intent is COVER_PHOTO |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that the shortest axis has a minimum length when photo size is xxlarge | Link |
PhotosLargeOrXlargeOrXXLargeMustBePresent
| Preconditions |
|---|
intent is GALLERY |
photos is present |
| Definition | Severity | API | Sample | Mode |
|---|---|---|---|---|
Validate that large, xlarge, or xxlarge is present | Link |