Your Ad Here

Form validation tools

In the Simplified Form Errors comments, J. Shell mentions the use of a form validation toolkit.

I’ve evaluated a number of form kits and validators over the years for PHP, Java, ASP, and Perl. They all have fallen short of my expectations and the needs of real-world development. Some of them have faulty validation — letting things through that shouldn’t be or disallowing valid input. Others aren’t flexible enough to allow non-standard inputs. Sometimes I need a rather custom validation like 32 characters, numbers and lowercase letters only, no spaces. And many packages won’t let you inject your own error messages into the error output. For example, just because a username validates doesn’t mean someone can register it. There may already be someone using that name, so I’d need to insert an error that the user needs to pick a different name.

I’d certainly be open to a good form validator, either commercial or open source. Since I’ve recently been doing most of my development in PHP, a PHP form toolkit would be most useful. Any suggestions?

Adam Kalsey
July 31, 2003 9:56 AM

In doing a bit of poking around I came across VDaemon at http://www.x-code.com/vdaemonwebform_validation.php which looks interesting. I’ll try it out and report back.

One concern is that it’s GPL. While I can include and distribute the code in my applications, I’ll need to add the GPL license to the form validation portions. And some clients might not like the idea of having part of their application licensed under the GPL.

Bart Vermeersch
July 31, 2003 10:55 AM

I guess you’re not really into MS. I have done some work using asp.net validators and they were OK for me. The server generated client scripting whenever possible.

J.Shell
July 31, 2003 11:03 AM

The toolkit I mention, “Formulator,” which is a Zope only toolkit, does allow customization of error messages and the ability to call custom validators (ie - calling a script to see if an email address is already registered). With some work, you can write custom widgets and more advanced validators.

It’s only real downfall is that there’s no built in way to do group validation - ie, checking that a ‘password’ and ‘password (validate)’ field contain the same value. You can do such things manually after the form toolkit has done its field by field validation, but it would be nice to have it plugged in to the same validation framework.

But that’s a good set of evaluation points:

  • Customization of error messages for different validation failings
  • Custom validation (ie - calling a script or function that returns ‘true’ or ‘false’)
  • Multi-field validation

Ralph Guzman
August 7, 2003 12:38 AM

If you are looking for a PHP solution, take a look at PEAR. (http://pear.php.net). They have a library that allows you to create and validate forms more efficiently:

http://pear.php.net/manual/en/package.html.html-quickform.php

An alternative which I’ve been using is this form validation class that you can find here:

http://www.phpclasses.org/browse.html/package/1.html

Hope this helps.

Arvis
September 12, 2003 10:10 AM

The link to Adam Kalsey’s form validator (http://www.x-code.com/vdaemonwebform_validation.php ) does not work!!

fred
September 7, 2005 3:21 PM

In your simple validation form, how would you do the same for a list, field? Thanks.

Fred.

This discussion has been closed.

Lijit Search

Best Of

  • Writing Realistic Job Descriptions Publish a job listing like this one and you are virtually guaranteeing that you won't get qualified applicants for the position.
  • Where do the RSS ad startups fit in? Yahoo's RSS advertising service could spell trouble for pure-play RSS advertising services unless they adapt their business model.
  • Let it go Netscape 4 is six years old.
  • Pitching Bloggers Forget what you learned in your PR classes. Start acting like a human instead of a marketer, and the humans behind the blogs will respond.
  • Lock-in is bad T-Mobile thinks they'll get new Hotspot customers with exclusive content and locked-in devices.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

Recently

Cloud Reliability (Aug 12)
Would you like to take bets as to whether Amazon or Google have better reliability and safety than your local network service providers?
George Carlin (Jun 22)
"I'm always relieved when someone is delivering a eulogy and I realize I'm listening to it."
Business lessons from the Kitchen (Jun 9)
The Gordon Ramsay School of Business
Under The Radar twittering (Jun 3)
My live stream from Under the Radar
Measuring a CEO's mind (May 29)
Not everything that's important can be measured. Not everything that can be measured is important.
Golden 1: breaking customer expectations (May 25)
Take a potential new user and give them a poor signup experience, then call them a liar.
Sprout Test (May 7)
A test post for Sprout widgets.

Subscribe to this site's feed.

Elsewhere

Feed Crier
Get alerted by IM when your favorite web sites and feeds are updated.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks
Del.icio.us
My tagstream at del.icio.us.
Waddlespot
My son's Club Penguin community. News, blogs, tips, and tricks.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2008 Adam Kalsey.
Content management by Movable Type.