I have an entity that has a field attached to it and the values that user types into the field has to be globally(website) unique(compared to other entities).
I have added validation to the entity form but what if I create this entity programmatically? How can I prevent the entity to be saved into the storage?
I've noticed there is a validate method in ContentEntityBase, though not in ConfigEntityBase. Is this the place for it? If so, I could use some examples.