When it comes to making custom helpers, how can we get the value for the validation attributes (client-side validation)? for example the built in helpers do something like this:
<label class="control-label " for="Starts">Starts</label>
<span class="field-validation-valid text-danger" data-valmsg-for="Starts" data-valmsg-replace="true"></span>
<input class="form-control text-box single-line" data-val="true" data-val-date="The field Starts must be a date." data-val-required="The Starts field is required." id="Starts" name="Starts" type="date" value="" />
<br />
so now in my custom helper I should determine the validation type data-val-date for example
and validation messages. The ModelMetaData
does not have any property for that. How could this be done ?