Move the IValidationRule<T, TProperty>.SetDisplayName(string)
method to the IValidationRule
interface.
#2179
Milestone
IValidationRule<T, TProperty>.SetDisplayName(string)
method to the IValidationRule
interface.
#2179
Is your feature request related to a problem? Please describe.
When creating an inherited class from the
AbstractValidator<T>
it is not possible when overriding theOnRuleAdded()
method, to change the display name of the property.It is also not possible to cast the rule into the
IValidationRule<T, out TProperty>
because theOnRuleAdded()
is called for each property to validate.Describe the solution you'd like
It will be great to move
IValidationRule<T, TProperty>.SetDisplayName(string)
method to theIValidationRule
interface.Describe alternatives you've considered
We can use reflection currently for this work around:
Additional Context
No response
The text was updated successfully, but these errors were encountered: