JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text">
<input type="text">
<input type="text">
<input type="text">
CSS
.error{
border : 1px solid red;
}
JavaScript
var a = [2,3,3];
$.each(a, function(i,e){
$('input').eq(e).val('hey');
});