Override validate function