root/StructuredWeb/StructuredWeb/Validation/ValidationFramework/Validators/EmployeeValidator.cs
| 102 | 107 | ||
|---|---|---|---|
27 | if (employee != null) | 27 | if (employee != null) |
28 | { | 28 | { |
29 | if (!suppressWarnings && employee.HireDate > DateTime.Now) | 29 | if (!suppressWarnings && employee.HireDate > DateTime.Now) |
30 | result.Messages.Add(new ValidationMessage { | 30 | result.Messages.Add(new ValidationMessage |
31 | Message = string.Format("Employee hire date: {0} is set in the future.", employee.HireDate), | 31 | { |
32 | Warning = true}); | 32 | Message = string.Format("Employee hire date: {0} is set in the future.", employee.HireDate), |
33 | Warning = true | ||
34 | }); | ||
33 | 35 | ||
34 | if (employee.Person != null) | 36 | if (employee.Person != null) |
35 | { | 37 | { |
Download diff