I’m used to working with jQuery and check every field individually.
But now I’ve many different forms on a website and I’d like to write one function that would loop through all fields who have a class name “required”. If one of the field has the class required and is empty, append a class “error” to that field.
How would I go about doing that ?
Thanks in advance!
In your submit handler: