I want to use the built-in validation mechanism to validate entity, just like it is done now, but in a different context.
For example I want to distinguish if published status is about to change or if only title is about to change(or with the workflow module if state is being changed from A to B, different validation should apply). Currently the \Drupal\Core\Entity\ContentEntityBase::validate
does not provide any way to distinguish this context.
So I wonder if there is a way to do this Drupal-way or if I simply have to create some sort of wrapper and somehow map it to the typed data “schema”…which basically means I can do without constraints with simple exceptions, which I don’t like.