contentfully
contentfully copied to clipboard
Add support for validation of entries based on content model
It would be great to be able to enable validation for pre-production scenarios where content might not match the current content model specification.
Content getting out of sync with the latest schema can easily happen as you evolve the content models and incur "content debt" over time.
Having an option to enable validation for the models you pull down, where exceptions or callbacks get call when they are invalid would be really helpful. For example:
const contenfully = new Contentfully(contentfulClient, {
validate: true,
onValidationFailed: (entry: any, field: string, reason: string) => throw new Error()
});