RuleFor(getEligibleShippingDetails => getEligibleShippingDetails.ShipFromAddress)
.NotNull()
.WithMessage("Ship from address is required.")
.SetValidator(shippingFromAddressValidator.FluentValidator)
The exception I'm getting is
Exception : Invalid get eligible shipping services request. 'Email' must not be empty. Email address is required.
The message doesn't include that it was actually validation of ShipFromAddress property.
Of course I can pass a reference message to the child validator like "Ship from address", however, maybe there is a more elegant way to do it.
Tried something like that,
RuleFor(getEligibleShippingDetails => getEligibleShippingDetails.ShipFromAddress)
.NotNull()
.WithMessage("Ship from address is required.")
.SetValidator(shippingFromAddressValidator.FluentValidator)
.WithMessage("Invalid ship from address.")
However the last message was ignored.
Any advise.