If an HTML form contains an input text field and it is declared like this:
<input type="email" id="loginEmail" placeholder="Email address" required>
Then the if this field is empty and user clicks on submit button then an error appears that "Please fill out this field"(Stackoverflow wont let me upload images because my reputation is too low :( )
But if the click on submit button of this form is handled via Javascript or JQuery and if false is returned from the function, no notification appears and no checking happens. How to resolve it? I want to handle the onClick event of submit button but still want this feature of checking empty fields. Any help?