[ This message contains John Lawton's response to my post which appeared
directed at the list, and my response below. -mark ]

John Lawton wrote:
> 
> On Saturday, March 2, 2002, at 08:43 AM, Mark Stosberg wrote:
> 
> > On Fri, 1 Mar 2002, John Lawton wrote:
> >
> >> While this may be peripheral to CGI::Application, I'd like to get some
> >> feedback on what others are using for form validation. I am
> >> particularly
> >> interested in documented (tested) packages, as opposed to homegrown, ad
> >> hoc solutions. (With all due respect to the hackers out there)
> >>
> >> I have taken a look at Data::FormValidator. This module makes it
> >> possible to describe the required/optional parameters, dependencies,
> >> filters, and constraints in a separate file (metafile).  I like the
> >> approach this module takes, from my experience as a programmer, it
> >> seems
> >> like this module is comprehensive. However, I am still wondering if
> >> CGI::Application people are using any other interesting modules for
> >> this
> >> purpose?
> >
> > I also use D:FV, but then again, I'm also the module maintainer. :) One
> > annoyance I have with it lately is that it doesn't validate that the
> > syntax of your profile is acceptable, the way HTML::Template does for
> > your tmpl_ tokens. For example, if you mean to type "constraints" but
> > type "contraints" instead, your constraints will fail silently. On my
> > TOD DO list is to add a lot of checks of this variety so you might get a
> > message back like "ERROR: unrecognized parameter name: 'contraints'".
> >
> > This wouldn't involve in API changes, just better internal validation.
> 
> That would be cool, IMO typos in hashtables are one of the gotchas in
> Perl.
> 
> Have you considered a DTD for an XML spec for the profile file? I think
> this would be nice because you could use the XML parser to validate the
> document, and you would also have the option of using XML editors and
> XML viewers to edit and display the profiles. Would others be interested
> in a frontend to the D:FV profiles?

I hadn't thought of that, but it sounds like a reasonable idea. I
thought of a different kind of front-end to D:FV: a generic web-based
"create a profile" CGI::App mini-app. A cool  bonus feature to this
system would allow to you point this at a database table as a starting
point. At least in many of my own apps, the forms come close to
mirroring database tables. This would give you a nice UI like: "Validate
as: [ email | phone | postal code ]", where that last bit is my humble
representation of an HTML drop down menu. With such a system, I think
I'd be likely to develop more thorough and stricter validation schemes. 

   -mark

 . . . . . . . . . . . . . . . . . . . . . . . . . .
   Mark Stosberg              Principal Developer  
   [EMAIL PROTECTED]       Summersault, LLC     
   765-939-9301 ext 223       website development  
 . . . . . http://www.summersault.com/ . . . . . . .

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to