@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 552 B
JavaScript
import{translate as e}from"../../i18n/translate.mjs";import{normalizeRelationCollections as t}from"../../collection/custom-fields/fields/relation/utils/normalize-relation-collections.mjs";const n=(n,r)=>{switch(n.type){case`relation`:{let i=r.collections.filter(e=>e.getData.mode===`multiple`).map(e=>e.key);for(let r of t(n.collection))if(!i.includes(r))throw Error(e(`server:core.fields.relation.validation.collection.not.found`,{data:{collection:r,field:n.key}}));break}default:return}};export{n as default};
//# sourceMappingURL=check-field.mjs.map