0

i have a form that i have put on couple pages, I have a 'Next' button wich is displaying the next page, and, when on last page turns to a submit button But I want my form to display the pattern errors of my text input before going to nextpage. So how can I trigger this message with javascript ? I prefer not using JQuery, but if there is no other solution i'll take it :)

This is the pattern/empty-field error i'm talking about

Thank you for your help !

Community
  • 1
  • 1
AACT2
  • 1
  • 3
  • Your question was already answered [here](https://stackoverflow.com/questions/7548612/triggering-html5-form-validation) – Eclipse May 20 '20 at 07:53
  • Thanks it helped me even if it's not exactly what i was looking for – AACT2 May 20 '20 at 09:07

1 Answers1

0

You should caught the submit event, do event.preventDefault(), to prevent default forn submitting, and then do your validation.