I know to use Html 5 validation with ajax we generally use submit event handler and not button with preventDefault click like below
- class="input-group">
- "email" required>
- "submit">
- "
- $('form').submit(function(event){
- event.preventDefault();
- $.ajax(){
- // submit data to controller
- }
- });
Ok , thats a good solution to force Html 5 validation to work without submitting the form but it violates the definition of Ajax and causes to refresh the page when page is submitted with satisfied validations.
Is there any solution till date to use html 5 validations without page refresh.



Darshan ShahPosted Aug 1, 2020, 6:22 AM
Laxmidhar SahooPosted Jul 31, 2020, 12:10 PM
Varun SetiaPosted Jul 31, 2020, 3:00 AM