Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #138 (closed defect: fixed)

Opened 14 years ago

Last modified 12 years ago

eliminate validation_error and has_error

Reported by: kevin Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TurboGears Version:
Severity: normal Keywords:

Description (last modified by kevin) (diff)

In svn, a new has_error argument has been introduced on controller methods. The new style is a lot more convenient than the validation_error style. Both should be eliminated, like so:

Here's my thinking, if a validation error comes up:

  • save the errors in the request
  • if there's a validation_error method, call that with a DeprecationWarning?
  • otherwise just call the original method, which can check for the

presence of errors

Change History

comment:1 Changed 14 years ago by michele

Maybe it would be nice to have this logic moved inside a special class of widget (ValidableWidget??), so that you can check against the widget if the values it contains are valid and retrieve them as a widget attribute or display a message error. Is this doable?

comment:2 Changed 14 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

done in [281].

Note: See TracTickets for help on using tickets.