Opened 15 years ago

Closed 15 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

Description

You had

Form.errors

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

f.errors
{'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 by Tim Graham, 15 years ago

Component: UncategorizedDocumentation

comment:2 by Tim Graham, 15 years ago

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