Validierung CREW DateOfBirth

This commit is contained in:
Daniel Schick 2023-05-09 07:07:23 +02:00
parent 78bc71d2ca
commit f6316e52dc

View File

@ -305,6 +305,9 @@ namespace bsmd.database
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename));
} }
if ((this.CrewMemberDateOfBirth.HasValue) && (this.CrewMemberDateOfBirth.Value > DateTime.Today))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename));
} }
#endregion #endregion