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
Current implementation checks if parameter type is class. This check fails if we use ICollection<T> as parameter type.
ASP.NET is able to deserialize to it, it is also possible to create and register IValidator<ICollection<T>>.
What is the reason for not allowing such interfaces to be auto-validated?
In PR with refactor of IsCustomType (#32) it is proposed to change to even more strict, by disallowing anything that implements IEnumerable, which I would consider breaking change and would like to understand the reason for it.
The text was updated successfully, but these errors were encountered:
Hi @tomasz-soltysik, thanks for expressing your concerns! I haven't really gotten around to reviewing the PR that you mentioned. If the merging of said PR would result in a breaking change it will not be something that will be released in the v1.x versions. If a breaking change would slip through the cracks it is something I would revert right away.
Regarding the validation of ICollection and variants; great point, I guess if FluentValidation supports validation for it we should support it as well. If anything I am of the opinion that the IsCustomType check should be more relaxed instead of more strict. I am also reluctant to relaxing the IsCustomType check in the v1.x versions since you also could argue that that would also be considered a breaking change :).
Current implementation checks if parameter type is class. This check fails if we use
ICollection<T>
as parameter type.ASP.NET is able to deserialize to it, it is also possible to create and register
IValidator<ICollection<T>>
.What is the reason for not allowing such interfaces to be auto-validated?
In PR with refactor of
IsCustomType
(#32) it is proposed to change to even more strict, by disallowing anything that implements IEnumerable, which I would consider breaking change and would like to understand the reason for it.The text was updated successfully, but these errors were encountered: