I have a [Range] annotation that looks like this:
[Range(0, 100)] public int AvailabilityGoal { get; set; }
My webpage looks like this:
I guess you could override the Range object and add this behaviour.
Range
public class OptionalRange : RangeAttribute { public override bool IsValid(object value) { if (value == null || (int)value == 0) return true; return base.IsValid(value); } }