public override string Validate(TimesheetEntry timesheetEntry) { if (!TasksRequiringPBI.Contains(timesheetEntry.Task.Name) && timesheetEntry.HasPBI) { return("Please update the task name (i.e. Software Development)"); } return(null); }
public override string Validate(TimesheetEntry timesheetEntry) { if (timesheetEntry.Billable && !timesheetEntry.HasPBI && ( TasksRequiringPBI.Contains(timesheetEntry.Task?.Name) && ProjectsRequiringPBI.Any(p => timesheetEntry.Project?.Name.StartsWith(p) == true) ) ) { return("Please add PBI+Task"); } return(null); }