Anyone have success with this? Can't access via request because it hasn't resolved when validate runs.
This is what i've tried but breaks:
validate: async (val, options) => {
const slug = options.req.collection.config.slug;
if (val === "resources" && slug === "checklist-items" ) {
return true;
} else if (val === "resources") {
return "Resource type is not valid for this collection"
}
}
Thanks!