Range annotation between nothing and 100?
问题 I have a [Range] annotation that looks like this: [Range(0, 100)] public int AvailabilityGoal { get; set; } My webpage looks like this: <%=Html.TextBoxFor(u => u.Group.AvailabilityGoal)%> It works as it should, I can only enter values between 0 and 100 but I also want the input box to be optional, the user shouldn't get an validation error if the input box is empty. This has nothing to do with the range but because the type is an integer. If the user leaves it empty it should make