Cross field validation

Hi, Is it possible to validate between multiple fields ?
e.g. I got Begin Date and End Date in my entity, I want to validate that End Date > Begin Date, if not I want to block update/insert and notify user.
Is there native functionality in cuba or should I check this by overriding BeforeInsert and BeforeUpdate methods ?
If I should override in BeforeInsert/BeforeUpdate how may I notify user with dialog/redcolored border/etc. ?

Thank you

Found out it is possible to override postCommit/preCommit methods in AbstractEditor, where I am able to use method showNotification() and return false if there is any problem e.g. End Date < Begin Date. [https://doc.cuba-platform.com/manual-6.3/abstractEditor.html].

Hi Michal,

Please, have a look at Bean Validation (https://doc.cuba-platform.com/manual-6.4/bean_validation.html). It will be the right way to implement cross fields validation.

Regards,

Aleksey