JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
    <head>
        <title>RPEMS: Login</title>
        


</head>
<body>
    <div id="header">
        <img id="logo" src="../img/logo.png"></img>
            <ul id="navBar">
                <li class="navLink">
                    <a href="/">Home</a>
                </li>
                <li class="navLink">
                    <a href="/about">About/Contact Us</a>
                </li>
                <li class="navLink">
                    <a href="/calendar">Calendar</a>
                </li>
                <li class="navLink">
                    <a href="/login">Login</a>
                </li>
            </ul>
    </div>

    <form method='post' action=''>
        <fieldset>
            <label for='email'>Email: </label>
            <input name='email' id='email' type='text'></input>
            <br class='error'></br>
            <label for='email' class='error' id='emErr'>This field is required</label>
            <label for='email' class='error' id='emValErr'>Invalid email adress</label>
            <br class='error'></br>

            <label for='pass'>Password: </label>
            <input name='pass' id='pass' type='password'></input>
            <br></br>
            <label for='pass' class='error' id='passErr'>This field is required</label>
            <br class='error'></br>
            <p class='error' id='phpErr'></p>

            <input type='submit' name='submit' id='submit_btn' value='Submit'></input>
        </fieldset>
    </form>

JavaScript

$(function()
{
    $('.error').hide();
$('.button').click(function()
{
    $('.error').hide();
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    var email = $('input#email').val();
    var pass = $('input#pass').val();
    var err = false;

    if (!email)
    {
        $('label#emErr').show();
        $('input#email').focus();
        err = true;
    }

    if (!filter.test(email))
    {
        $('label#emValErr').show();
        $('input#email').focus();
        err = true;
    }

    if (!pass)
    {
        $('label#passErr').show();
        $('input#pass').focus();
        err = true;
    }

    if (err) return false;

    var dataString = 'email=' + email + '&pass=' + pass;
    $.ajax({
        type: "POST",
        url: "log.php",
        data: dataString,
        success: function(result)
        {
            if (result.success == true) window.location('../');
            else $('p#phpErr').html(result.message).show(); //missing a single quote here after the p#phpErr
        }
    });
}); //Missing a ) here to close out the click function
});