Opened 9 years ago

Closed 9 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: no UI/UX: no


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 9 years ago by Tim Graham

Component: UncategorizedDocumentation

comment:2 Changed 9 years ago by Tim Graham

Resolution: invalid
Status: newclosed

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