I need a sophisticated validation logic that will go through several fields. Is there a way to do this every time the save () or update () function is called for the model? I am currently using Ebean as my ORM. The only way I can think of now is to override save () as:
public class User extends Model { @Override public void save(){ if(this.validate()){ super.save(); } } .. }
Is there a more standardized way to do this?
source share