Hi J
Yes, I trying to use WithMessage("Value must be between {min} and {max}")
How do I provide the min and max argument? The predicate looks like:
private static bool Calc(RegistrerSalgInput input, decimal beløb)
{
decimal maxTax = (input.Beløb*RegistrerSalgInput.TAX)/99; // This value should be present in arguments as max
decimal minTax = (input.Beløb*RegistrerSalgInput.TAX)/101; // This value should be present in arguments as min
return beløb >= minTax && beløb <= maxTax;
}
Ken