I am stuck with this issue to which I did not pay attention to before.
<label> Email Address </label>
<input type="email" id="emailAddress" required placeholder='Email Address' />
<button type="submit" class="button primary small">Submit</button>
In my JS file I am checking for its validation using checkValidity()
checkValidEmail: function(event){
var emailAddress = $('#emailAddress');
if(emailAddress[0].checkValidity()){
console.log('Valid');
} else{
console.log('Not Valid');
}
}
"keyup #emailAddress": "checkValidEmail" // KeyUp works as expected
Output:
'a@b' // Valid
I do not understand this behavior. As per my knowledge @.com was the regex for input email.
Please note: I tried this on multiple sites with forms and it shows the same input. In the above case I am executing this on the chrome browser.
Thanks for taking time to reply!