Fix validation of required fields