JSFiddle - React, Tailwind, and code Playground

HTML

<div id="ng-app" ng-app>
<div id="d_contact_form"   ng-controller="Controller">


    <form name="form" id="ajax_form" novalidate class="css-form" method="post">
        <span class="label" ng-class="{red: form['contact.name'].$invalid && submited}">Nombre*</span>
        <input type="text" name="contact.name" ng-model="contact.name" required>
        <br>
        <span  ng-class="{red: form['contact.surname'].$invalid && submited}">Apellidos*</span>
        <input type="text" name="contact.surname" ng-model="contact.surname" required>
        <br>
        <span>Empresa</span>
        <input type="text" name="contact.enterprise" ng-model="contact.enterprise">
        <br>
        <span>Teléfono de contacto</span>
        <input name="contact.phone" type="text" ng-model="contact.phone">
        <br>
        <span ng-class="{red: form['contact.email'].$invalid && submited}">Correo electrónico*</span>
        <input name="contact.email" type="email" ng-model="contact.email" required>
        <br><br>
        <span class="label">Cantidad solicitada</span>
        <input name="contact.quantity" type="text" ng-model="contact.quantity">
        <br>
        <span >Comentarios</span><textarea name="contact.msg" ng-model="contact.msg"></textarea>    
        <br>
        <div class="bt_send">
            <a href="#" ng-click="update(contact)">ENVIAR</a>
        </div>

    </form>

</div>
</div>

JavaScript

function Controller($scope) {
    
    $scope.submited = false;
    
    $scope.update = function(contact) {
        
        $scope.submited = true;
        
        if ($scope.form.$valid) {
            alert('Good');
        }else{
            alert('Bad');
        };
    }
}