Re: [Maypole] 2.07 PR

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Tue Jan 18 2005 - 09:45:52 GMT


Tony Bowden wrote:
> On Mon, Jan 17, 2005 at 11:59:05PM +0000, Dave Howorth wrote:
>>Suggestions are easy :) Provide a method so the handler can set an
>>error message (make error() a mutator as well as accessor or provide a
>>raise_error($msg)). Patches would take a little longer, but I'd like to
>>look at Data::FormValidator when I get some time to spend in this area
>>and there are other things I need to do first.
> Can you give an example of an occassion where you'd like to be able to
> do, but can't?

Well yesterday I wrote a handler for DateTime (actually
DateTime::Format::ISO8601). When you pass it an invalid date DT says
things like:

   The 'month' parameter ("21") to DateTime::new did not pass the
   'is between 1 and 12' callback

which I think would be more helpful to the user than CGI::Untaint's:

   time_of_record (1999-21-22) does not pass the is_valid() check

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT