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
{{ message }}
This repository was archived by the owner on May 26, 2025. It is now read-only.
To have an option to include the validated value in the error message.
Feature in action
m =>m.EqualTo(666).WithMessage("The value {_model} is not equal to 666");
validator.Validate(555).ToString();// The value 555 is not equal to 666
Feature details
That would be certainly another layer of creating the messages, {_model} placeholder would be in the cache and replaced with the actual value just during the validition.
ValidationContext would perform the operation during the validation.
Questions
That's technically, possible, but why implement this?
Is this really needed?
The fact that it's possible doesn't mean it's easy. And would certainly affect the perfromance.