Opened 6 years ago

Closed 6 years ago

#12908 closed (invalid)

Incorrect doc on Form.errors

Reported by: Lei Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


You had


Access the errors attribute to get a dictionary of error messages:

{'sender': [u'Enter a valid e-mail address.'], 'subject': [u'This field is required.']}

f.errors should be f.errors.items() to get the dictionary of error messages.

Change History (2)

comment:1 Changed 6 years ago by timo

  • Component changed from Uncategorized to Documentation
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by timo

  • Resolution set to invalid
  • Status changed from new to closed

f.errors returns an ErrorDict (subclass of dict) while f.errors.items() returns a list.

Note: See TracTickets for help on using tickets.
Back to Top