Two answers to this:
1) whatever you do to validate, do it in validators. That's the way we
currently go, and I don't see a reason not to do it. It's the clean road.
2) if you insist on doing it your way, I can only guess, but after a peek
into tg.controllers it appears as raising a formencode.Invalid-exception from
your controller *might* actually do what you want. Did you try that?
If you are successful with the second approach, it would be good if you could
come back here to tell us about that, so we know for future reference.
Diez
When using chained validators, you need return the error-message
properly. Right out of my head I can only say that you need to return
raise the Invalid-exception with not a string, but a dictionary as
error-message. And the keys of that dict need to match the form-fields.
Something along these lines. If that's not working, I try & dig some
code out, but that has to wait for work tomorrow.
Diez