Validation issue: Why can the form be submitted when all required fields are not filled?