JSFiddle - React, Tailwind, and code Playground

HTML

<form id="personForm" name="personForm" method="post" 
    action="/Demo/jsf/main.jsf;jsessionid=0596FB948C236D0FFC16227FC10A0C23" 
    enctype="application/x-www-form-urlencoded">
    <div class="field">
        <label>Last Name</label>
        <input id="personForm:lastname" name="personForm:lastname" type="text" value="" />
    </div>
    <div class="field">
        <label>First Name</label> 
        <input id="personForm:firstname" name="personForm:firstname" type="text" value="" />
    </div>
    <div class="field">
        <label>Address</label>
        <input id="personForm:address" name="personForm:address" type="text" value="" />
    </div>
    <!-- ... more HTML ... -->
</form>

CSS

form { margin: 15px; }
.field label { width: 100px; float: left; }
.required { border-color: red; }

JavaScript

$( document ).ready( function() {
    $( "#personForm:firstname" ).addClass( "required" );
});