[FrameworkBundle] Optimize validator registration