JSFiddle - React, Tailwind, and code Playground
HTML
<form onsubmit="return proceed();">
<input type="text" name="email" id="email">
<input type="button" text="submit" onclick="proceed()" />
</form>
JavaScript
window.proceed = function () {
var email = document.getElementById('email').value;
if (email == "") {
alert("Empty variable \n");
} else if (email.indexOf("@") == -1) {
alert("No @ \n");
} else return true;
}