.. _validate_tg2: TurboGears 2 ------------ In ``myapp/controllers/root.py``, change the following line:: from tg import expose, flash, require, url To:: from tg import expose, flash, require, url, validate Inside the ``RootController`` class, add the following:: @expose() @validate(form=movie_form, error_handler=movie) def save_movie(self, **kw): return str(kw) Also, update the existing ``movie`` method, change:: def movie(self): to:: def movie(self, **kw):