Has anyone extended the Range attribute to be able to have a variable range?
I have a similar need but I can't make this work:
public class YearRangeAttribute : RangeAttribute
{
public YearRangeAttribute()
: base(typeof(DateTime), DateTime.Now.AddYears(-100).Year.ToString(), DateTime.Now.AddYears(-14).Year.ToString()) { }
}
There is nothing on the page when it is rendered to the browser.
Any ideas?
TIA