You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassDemographicValidator:AbstractValidator<AppContext>{publicDemographicValidator(){
RuleForEach(x => x.Assignments).ChildRules(x =>{ x.RuleForEach(x => x.StaffHistory).ChildRules(x =>{ x.RuleFor(x => x.StartDate).NotEmpty().WithMessage("Start Date is required.");});}}}
I've omitted most of the rest of the validation for brevity, as that all worked without issue until this one. Once it gets here it throws a null reference error when trying to get property.GetValue(model, null) because property is null.
I've omitted most of the rest of the validation for brevity, as that all worked without issue until this one. Once it gets here it throws a null reference error when trying to get property.GetValue(model, null) because property is null.
It looks like it's trying to get AppContext.StaffHistory instead of Assignment.StaffHistory.
The text was updated successfully, but these errors were encountered: