DateRangeValidatorAttribute ->NullReferenceException

Topics: Validation Application Block
Jul 12, 2007 at 6:31 PM
Edited Jul 12, 2007 at 6: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!