diff options
Diffstat (limited to 'src/data/validators.js')
-rw-r--r-- | src/data/validators.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/data/validators.js b/src/data/validators.js index 39559cfa..f886c4f2 100644 --- a/src/data/validators.js +++ b/src/data/validators.js @@ -819,6 +819,17 @@ export function validateReferenceList(type = '') { return validateArrayItems(validateReference(type)); } +export function validateAnnotatedReference(type = '') { + return validateProperties({ + reference: validateReference(type), + annotation: optional(isContentString), + }); +} + +export function validateAnnotatedReferenceList(type = '') { + return validateArrayItems(validateAnnotatedReference(type)); +} + export function validateThing({ referenceType: expectedReferenceType = '', } = {}) { |