Optimize doctrine callback validator