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 #2528 (closed defect: migrated)

Opened 9 years ago

Last modified 8 years ago

Form errors are cut off if they include a colon

Reported by: silentsound Owned by:
Priority: normal Milestone: __unclassified__
Component: TurboGears Version: 2.1rc1
Severity: normal Keywords:
Cc:

Description

I'm using an EmailAddress validator within a FormEncode schema passed in to the @validate decorator. If an error with a colon in its message gets raised (e.g., "The domain portion of the email address is invalid (the portion after the @: foobar)"), then the error message in the form_errors dictionary gets cut after the colon (e.g., "The domain portion of the email address is invalid (the portion after the @").

I've tracked this down to line 332 of decoratedcontroller.py:

    field_value = error.split(':')

This should instead be:

    field_value = error.split(':', 1)

Change History

comment:1 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.