Best way to validate forms?
Does anyone have any tricks/tips on validating forms (no plugins)?
There doesn't really seem to be any universal way to make a javascript function that will suit everything, you almost have to hard code form/input names into the function, which is nasty if you're going to be working with a lot of forms in a project.
I mean I could make something that checks for empty fields or validates an email address but what if I need to see if a <select> listbox value=="this" and if it does then make sure this <input> field=="this".. things would get really messy..
|