-1

I have an email type input and I want to check if the inserted value matches the following pattern: word1@word2.word3 where word1 = minimum 1 character and maximum 5, word2= minimum 1 character, and word3 = precisely 2 characters. And I don't want the form to be submitted unless this condition is met. I hope someone can help me

  • This what Regular Expressions are for. You will need to learn how ti use them with JavaScript. – PM 77-1 May 25 '22 at 21:00
  • Please visit [help], take [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output, preferably in a [Stacksnippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) – mplungjan May 25 '22 at 21:00
  • You just blocked me from submitting your form. I have 4 chars in word3, most have 3 – mplungjan May 25 '22 at 21:02

0 Answers0