Ok if you want to add this data to input then put your input in container such div and use this method
var $div = $('div');
var spltInp = $div.html().split(' ');
var i = Math.floor(spltInp.length / 3);
var srt = spltInp.splice(i, 0, 'data-val-required="The Requested value field is required." data-val-number="The field Requester must be a string." ');
var newHtm = spltInp.join(' ');
$div.append(newHtm).children().eq(0).remove();
https://jsfiddle.net/L2roc4ka/
First split() html inside the div (input) then, use some number between array length (i) to avoid putting attr outside the input , and use this number as starting point to index the attr by splice(), finally convert the array to string by join()and append it to your div then remove the old one.
note : avoid using multi classes if you going to use this trick cause it may lead to syntax error and instead put those classes in another container like section and style it or avoid using this one.
data(), just make sure you do it before you instantiate the plugin which reads those properties.data-with the element?datawon't adddata-*attributes. That's a common misconception.@Html.TextBoxFor(m => Requester.Value, new { @class="form-control ui-autocomplete-input valid"})and putting the[RequiredAttribute]on your property?datamanages jQuery's data cache, notdata-*attributes. jQuery will initialize the data cache fromdata-*attributes, but usingdataas a setter does not set the attribute; setting the attribute once you've read the data viadatadoesn't updatedata's copy of it. Example: jsfiddle.net/vukxk5e9