[html-formfu] transformer is not called if form is not valid

Carl Franks fireartist at gmail.com
Thu Dec 6 09:33:08 GMT 2012


Hi,

> Actually there is no form there.
> I tried to ignore error value, so in another word, there is no error.
> I think I should remove constraints and handle values just in transformers.

Sorry, I don't quite follow what you're meaning.

If there's a Constraint error, FormFu won't let you just ignore it.
It sees the Integer Constraint on 'bar', and that the user hasn't
submitted an integer - so it says "stop right there - you can't go any
further until you fix that".
So it might be that you don't want constraints in this case - but
generally it's probably a good idea to have low-level constraints that
ensure your transformers are receiving the type of value they expect.
This gets particularly important when your transformers start working
with values from multiple fields at once.

Hope this helps!
Carl



More information about the HTML-FormFu mailing list