I'm trying to get a jQuery event to only fire once the Form is valid - not using any extensions. For example I have an email field:
<input type="email" class="form-control" id="email" placeholder="info@example.com" aria-describedby="emailHelp" name="email" maxlength="250" required>
Inside a Form. Once the submit button is clicked, this event fires:
$("#submitForm").click(function() {
$("#spinnerSubmit").removeAttr('hidden');
});
But if the user does not put an correct email in the right format, the event fires but the Form still waits for an email input. Can i somehow check if the form is validated browser-sided, without using any overkill extensions? Or is my only option this?