only flatten validated attributes