Design comparison
Solution retrospective
The suggested languages for this challenge didn't incl. javascript, is there a way of implementing the validation messages on form submit w/o using javascript?
Community feedback
- @dnewbie25Posted over 2 years ago
Hi! Yes, there are a couple of ways to make a validation without javascript. You can use plain HTML with the
pattern
attribute, so you can specify a specific regular expressiom for that field. After having a good pattern you can use CSS to customize the error message, but sometimes it takes a good amount of CSS code. This is the best tutorial I have seen about it:https://css-tricks.com/form-validation-ux-html-css/
If you want to try another programming language, you would need to use a framework like Django, Flask or Ruby on Rails. This is because by default only Javascript is natively supported by the browsers. You can use many languages, but only through a framework. Ruby on Rails is a good framework since it allows you to manipulate the frontend smoothly.
https://stevepolito.design/blog/rails-real-time-form-validation/
Marked as helpful0
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