Skip to content

Add support for validation of entries based on content model #30

@sdedios

Description

@sdedios

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()
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions