Validation test function.