[html-formfu] value not accepted

Mario Minati mario.minati at googlemail.com
Wed Sep 26 21:04:16 GMT 2007

On Wednesday 26 September 2007 18:18:10 Carl Franks wrote:
> On 26/09/2007, Mario Minati <mario.minati at googlemail.com> wrote:
> > I just uploaded a new CopyValue filter to svn included a test and some
> > docs.
> >
> > There is on caveat:
> > If the value of the original field contains an invalid value (a value
> > that will be constrained through a constraint) this invalid value will be
> > choosen for this field (the field with CopyValue filter).
> >
> > So the user has to change two fields or you remove the invalid value in a
> > custom constraint.
> How about implementing it as a Transformer?

That is also a possibility,
but than we have an other caveat.

If the value of the original field is valid and all other values are valid to, 
the data is ready to be written to the database or where ever. Ok so far.

But if you think of Date Element or an element with an Inflator we run into 
trubble as all that processing didn't take place and the application can 
retrieve the data it is expecting.

So we have to die one death, right? (OT: Can you say that in english?)

The solutions I can think of gets somewhat complex:

Make a copy of original input data.
When constraint complains and original input data was empty and some flag is 
set we just erase the value and don't show an error message.

But we might get more 'why slow' questions on the ML.


More information about the HTML-FormFu mailing list