This came up as an aside in another thread and I was wondering the
same thing at the same time.  How do people do this? I guess there is
only one way:  Iterate over th errors CGI::Untaint gives you because
it knows nothing of your model class.

IMO , FromCGI should do this in the validate sub since it has the
error and the model and the column in hand at the time.  It could call

$usable_err_msg = $model->untaint_error($col) || "Invalid format for $field"
       if $h->error;

at the approprate place. 

But it does not.  Where eslse would you want to apply a usable error
message?  Would you want to look at them all again later on? I would
not.  Why did the author not put a hook in there for giving your own
error message?   I could be wrong and I could think different later on
when I have more experience but it has always seemed to me  that
FromCGI and AsForm -- crucial components in a DB application I might
add -- were released and left unfinished.  They are virtually
unsuitable for any production evironment.

This could be more motivation for Maypole to ditch FromCGI altogether.  :)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to