add test for validator