ReactiveValidation
ReactiveValidation copied to clipboard
Add a new parameter to WithMessage
Hello, would you consider tweaking the function WithMessage a bit. I would like to provide a custom error message with a computed value derived from the object (view mode) being validated. Current version allows to provide a static text
RuleFor(vm => ...).LessThan(vm =>...).WithMessage("Error");
I would like to do something like this
RuleFor(vm => ...).LessThan(vm =>...).WithMessage(vm =>$"Error{vm....}");
Thanks, Libor