validation test code