My text fields look something like this
@Html.TextBox("Something", "", new { type = "text", min = 1, max = 60, data_validation_integer_regex = @ValidationPatterns.Integer, data_validation_integer_message = @ValidationPatterns.IntegerMessage, data_bind = "value: observables.Something" })
What is displayed as
<input data-bind="value: observables.Something" data-validation-integer-message="Some message" data-validation-integer-regex="^[1-9]\d*$" id="Something" max="60" min="1" name="Something" type="text" value="">
Validation library we use jqBootstrapValidation
I would like to make some of my fields and a way to do this using this library, I need to add a tag to the input field, for example:
<input id="Something" ... required >
Razor does not allow me to do this, although it seems that all the parameters in this format
property="something" or property=100
is my only option returning to the standard html markup if I want to make my fields mandatory?
source share