Perhaps a stupid situation, but I could not find a solution. Input is added to the view manually and is in no way associated with the model. The second input for comparison:
@using (Html.BeginForm()) { ... <input id="1" class="form-control" type="text" value="" /> } <input id="2" class="form-control" type="text" value="" /> At startup (on page):
<form action="/Calls/Create" method="post" novalidate="novalidate"> ... <input id="1" class="form-control" type="text" value="" /> </form> <input id="2" class="form-control" type="text" value="" /> After entering values (on page):
<form action="/Calls/Create" method="post" novalidate="novalidate"> ... <input id="1" class="form-control input-validation-error" type="text" value="" aria-describedby="1-error" aria- invalid="true"> </form> <input id="2" class="form-control" type="text" value=""> The first input, which is in the block of the form, jquery prescribes additional attributes, the second remains unchanged. As far as I understand, jquery.validate.unobtrusive.js works. If you wrote something in addition to the numbers in the first input, then submit does not pass and puts the cursor there. Actually the question is how to disable this validation, which I do not need, or how to configure it? And what is the reason for this behavior?
data-val='false'attribute to the field, or callingHtml.EnableClientValidation(false);before the field - teran