Form validation tools

Freshness Warning
This article is over 7 years old. It's possible that the information you read below isn't current.

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.

Follow me on Twitter

Lijit Search

Best Of

  • California State Fair The California State Fair lets you buy tickets in advance from their Web site. That's good. But the site is a horror house of usability problems.
  • Let it go Netscape 4 is six years old.
  • The mouse and me Not only is the mouse very destructive, but it's evaded all attempts to capture or kill it so far.
  • Best of Newly Digital There have been dozens of Newly Digital entries from all over the world. Here are some of the best.
  • Google on the desktop Google picks up Picasa, giving them an important foothold on people's PCs.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

7

Recently

In which Vonage pretends their prices haven't changed (Apr 12)
Translating what Vonage marketing says about their price increase into plain English.
Twitter app competition (Apr 12)
Life as a Twitter app developer is far from over.
Twitter app competition (Apr 12)
Life as a Twitter app developer is far from over.
The rest of the world is not like you (Apr 5)
Normal people are different. Keep that in mind when creating or marketing a product.
Ideas, Risk, and Investors (Jan 1)
Over at SacStarts, I have piece up discussing a common question I get from entrepreneurs....
VoiceXML for web developers (Dec 17)
Building voice applications isn't hard at all. Any web developer can do it.
De-skunking a dog (Oct 27)
How to clean up your pet after a skunk attack.
Pressure sales via Twitter (Oct 16)
Sticking an ad in my face when we first meet is a good way to lose my interest.

Subscribe to this site's feed.

Elsewhere

IMified
Build instant messaging applications. (My company)
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

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