Dynamic DateTimeRangeValidator using Enterprise Library 4.1?

I'm trying to add a range of - 365 days and + 365 days, but it looks like using this attribute in EL 4.1 only accepts a special ISO string ... so I can't just add a normal line to this validation routine.

<DateTimeRangeValidator(DateTime.Now.AddDays(2), DateTime.Now.AddDays(4))> _

      

I wanted to do something similar to above - fyi

Does anyone know how you can get this attribute to accept this ISO w / out string encoding this value?

+1


source to share


1 answer


I think you need "RelativeDateTimeValidator". See the CodeProject article here .



UPDATE: CP link looks dead, here is MSDN link .

+2


source







All Articles