add validator factory