View Single Post
Old 03-07-2010, 08:28 PM  
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
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..
__________________
[email protected] - jakezdumb - 573689400

Killuminati
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote