I have used this
<input type="text" id="email" name="email" pattern="[a-z0-9._%+-]+[a-z0-9.-]+\.[a-z]{2,3}$" class="form-control" placeholder="Email" required>
So if email address is not in valid format then it should throw error.
it is to catch wrong email address format like name@jjjj
or name or name@
or name@jj.cooooo
etc
but it doesn't work i.e. it throws the message i.e. pattern must be matched even if the email is correct.