Add validator to factory