JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="" id="idemail">
JavaScript
$(document).ready(function() {
$("#idemail").blur(function() {
var checkemail = $(this).val();
console.log(checkemail);
if (/(.+)@(.+){2,}\.(.+){2,}/.test(checkemail)) {
alert('valid'); // valid email
} else {
alert('invalid');
}
});
});