DateRangeValidatorAttribute ->NullReferenceException

Topics: Validation Application Block
Jul 12, 2007 at 5:31 PM
Edited Jul 12, 2007 at 5:33 PM
I'm getting a nullreference exception if i try daterangevalidator on a Nullable<DateTime>... i haven't tried RangeValidator, but i imagine it would have the same problem. I tried doing Composition.And then adding IgnoreNulls that works for cases where a null is valid, but i tried NullNotAllowed and i get NullReferenceException again.

I think the range validators should take into account Nullable types in a future patch/release, thanks!

basically a null value should automatically fail validation on those, not throw an exception!