Hello,
when reusing a validator like here:
public EventValidator() { var beneficiaryValidator = new BeneficiaryValidator(); RuleFor(event => event.Beneficiary) .SetValidator(beneficiaryValidator) .When(event => event.Beneficiary != null); }
I have only two options.
1- Leaving everything as is and I will get the validation messages defined in the BeneficiaryValidator
2- Chaining WithMessage and lose the validation messages defined in the BeneficiaryValidator.
What if I want to preserve the detailed message about the beneficiary provided by the BeneficiaryValidator while adding to the message the information about, say, the Event Id?
thank you very much
Matteo