Added parameter check to custom validation functions