Design comparison
Solution retrospective
How can a make a better script to a form validation? A felt a lot difficulty
Community feedback
- @DavidMorgadePosted over 2 years ago
Hello Luiz, congrats on finishing the challenge!
To answer your question I have checked your code, and instead of defining yourself the conditions, you can use regular expression to check if the input is correct, you don't need to know that much about RegEX, you can just search for pre-made expressions for any type on the internet. You don't need to recreate the wheel!
Hope my answer helps you, if you have any question don't hesitate to ask!
Marked as helpful0@luizariloPosted over 2 years ago@DavidMorgade Thank you for the tip. I have another question, this time related to the error icon. How can I put it inside the input, as if it were in the placeholder?
0@Enmanuel-Otero-MontanoPosted over 2 years ago@luizarilo Hola Luis!
Me parece que no se puede hacer. Si encuentras alguna manera de hacerlo, te agradezco que me avises, pero estoy casi seguro que no se puede. Si te fijas el input es una etiqueta vacía, es decir que no permite contenido, no tiene etiqueta de cierre.
Esto último es la principal diferencia entre el input type="submit" y el button type="submit", el input no permite texto con formato y el button sí.
Saludos!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord