[Zope] Re: input marshaling and form validation (was: [Zope-dev] Stumped about handling thisparticularexception...particularexception...) handling thisparticularexception...particularexception...)

Paulo Eduardo Neves neves@inf.puc-rio.br
Thu, 29 Apr 1999 19:14:40 -0300


François-Régis CHALAOUX wrote:
> 
> Is there more details about this problem?
> - aren't good even for marshaling ...
> - ugly error screen ...
> 
> FR
> 
> >>> Paulo Eduardo Neves <neves@inf.puc-rio.br> 29/04/99 00:55:25 >>>
> 
> I've also already used :lines. The problem of these converters is that
> they aren't good even for marshaling. If you use :int or :float in a
> text input form you have the chance to get the ugly error screen. Since
> you don't have any way to control the output screen, it can crash the
> usability of your site. It's better to use them in very specific
> situations or in prototypes.

Hi Francois,

Try to use the :int in a text input form, something like:
<input type="text" name="age:int">

Then enter a non integer value for age. You'll get an ugly error screen.
If the value is really an integer, you will your dtml or external method
age variable will be an integer, instead of the usual string. 

I'm saying that using these marshaling parameters for an form where the
user directly specify the input value isn't practical. You don't have
control over the presented error screen. They are great to use in
checkbox, select lists and radio buttons where you can guarantee that
there's no invalid value.

regards,
--
Paulo Eduardo Neves
mailto:neves@inf.puc-rio.br
PUC-Rio de Janeiro