views:

631

answers:

1

I'm trying to add a range of - 365 days and + 365 days but it appears that using this attribute in EL 4.1 only accepts a special ISO formatted string ... thus I can't simply add a normal string to this validation routine.

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

I wanted to do something similar to the above - fyi

Does anyone know how you can force this attribute to accept this ISO formatted string w/out hand coding this value?

+1  A: 

I think what you want is a "RelativeDateTimeValidator" See CodeProject article here.

slf