Add validator and tests.