Fixed indentation in validate function