Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

Commented Issue: LengthValidator validates null inputs [7133]

$
0
0
Most validators should not validate null input, because that condition is validated with NotNull. LengthValidator assumes a length of 0 for null, breaking the convention.

I think LengthValidator should return true for null inputs.
Comments: Thanks for the suggestion. I need to have a think about the implications for changing this, as it would be a breaking change. Jeremy

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>