Added undefined condition for required fields validation.