add UT test cases

location: tests/test-validator.html