I\'m trying to validate a form using JavaScript but i\'m a bit stuck on displaying a message next to the field to say that \"This field is required\". How do I go about doing th
Simplest way is to put a hidden span tag below the input field like so
This field is required
In Javascript you can do this
if(!valid) { document.getElementById("fieldname").style = "block"; }