OptionalbeforeValidator set that runs within the transaction but before the entity is created.
OptionalbeforeValidator set that runs within the transaction but before the entity is deleted. This can be used to maintain constraints not expressable via other means, like checking that this entity is not referenced by other entities (in a non-foreign-key-manner) before proceeding with deletion.
Interface to define validator behavior for entities.