Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: weiner20050831

Message # 1030430:
Date: 09/20/05 02:22
By: Peter Jukel
Subject: XtraPHP

Hi

Although this is our product that I'm talking about, it is related to this article on OO-based validation, and shows the way we handled it.

Our PHP framework (called XtraPHP -- http://www.triplehash.com) includes, amongst other controls, a set of powerful validation controls similar to those in ASP.net. All you have to do is link them to their respective controls and they'll validate those controls' contents.

At the moment, we've got these validation controls:
- Required field validator
- Regular expression validator
- Type validator (e.g. check if a number was entered)
- Custom validator (use your own validation function)

It also maintains the state of the pages between requests, so if the page doesn't validate, you won't need to write one line of code to keep the entered values in their controls.

There is also a ValidationSummary control (idea also from ASP.net) that summarises validation errors that occurred on a page. So say you have a textbox called "Name" and you link a RequiredFieldValidator to that textbox. If the user doesn't enter a name when submitting the form, the summary control will show the RequiredFieldValidator's message e.g. "Please enter a name

Cheers

Peter

Previous Message | Next Message


Comments:
Excellent - thankspurplepomegranite09/28/09 07:06
Great article!Swiftaxe02/18/09 05:40
RE: PHP Form Validation System: An Object-Orientewilliam05/19/08 20:55
BullshhitFcuk! (make the change for me will ya)05/06/08 14:50
Help me to how to design a clocking systemNutty05/05/08 05:44
RE: How to stop BOTS from SPAMMING my PHP ForJames04/21/08 10:26
RE: How to stop BOTS from SPAMMING my PHP Forchris04/18/08 18:35
do not support class and functionmount09/21/07 04:42
need helpMaurice.Mullenders11/07/05 18:50
php codingcaesar olima10/16/05 08:55
XtraPHPPeter Jukel09/20/05 02:22
Reinventing the Wheel!!David Grinberg09/13/05 20:44
How to stop BOTS from SPAMMING my PHP FormJorge Borges09/12/05 23:56
PHP Form Validation System: An Object-OrienteNorman Wingrove09/06/05 22:04
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.