Add validation and unit test.