In symfony, add validator to store in factory.