Add validator with tests.