Form Validation Techniques

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Form Validation Techniques

Post by php_wiz_kid »

I was just wanting to see how you guys validate your forms. The way I do it just seems to take up way too much space and makes things complicated. I'm just looking for opinions. Thanks everyone.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Most of my forms fall into fairly regular categories (the controls anyways) .. so I have a bunch of control-type-to-validator mappings which are automatically taken care of when a submission happens. This is all done in a central script (99.999% of the time) that then shunts to whatever script the submission was intended for.
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post by AGISB »

I got a validation object for the standard validation. And if something is not covered I either add a new class or do it right where it is needed.
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post by php_wiz_kid »

Thanks for replying guys. It's always good to see other views on things.
Post Reply