Contentful logo

Contentful Community

Validate uniqueness across content types

#1

I have two different content-types. Both content type has a text field called url. Is it possible to add a validation to the field that checks that the value is unique across both content-types?

0 Likes

#2

Hi @gwehmeier,

AFAIK unique validity checks are always performed within the scope of the content type.

0 Likes

#3

You could work around that limitation with a UI Extension. That would work when editing content via the Contentful web app. It would not prevent API changes to apply the same value twice though (as Teemu pointed out)

0 Likes