I have created the following validation class :-
public class ProcessotInfo_Validation
{
public Nullable<double> SPEED { get; set; }
}
}
But currently by default the field will be required, and I am unable to submit the form unless I enter a vale fo th SPEED field. Can anyone advice what is wrong ?
The field on the view is rendered using the following code:-
<div >
<span class="f">CPU Speed (In MHz) </span>
@Html.EditorFor(model =>model.SystemInfo.ProcessorInfoes.FirstOrDefault().SPEED)
@Html.ValidationMessageFor(model =>model.SystemInfo.ProcessorInfoes.FirstOrDefault().SPEED)
</div>