@DavidMorgade
Posted
**Hello Oduh, congrats on finishing the challenge ! **
Regarding your question, yes, you can use the default validation from your html (you can see in your own project if you enter a wrong email it has some validation from default), if you want to make it more restrictive, you can use a pattern
in your html <input>
, also if you want this pattern to work you need to set another property on your <input>
wich is called required. This patterns can be filled with a regular expression, see this example I took from stackoverflow:
<input
type="text"
pattern="/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/"
required
>
With this you will have a validation without the need of Javascript, I would recommend using JS because you can manipulate better the error messages, but with the html one you are fine!
Hope my answer helped you!, if you have any questions, don't hesitate to ask
@preciousoduh
Posted
@DavidMorgade oh I see thank you so much David!! Yes it did I hope you have a very pleasant dayyy