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 , 15 years ago
Component: | Uncategorized → Documentation |
---|
comment:2 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
f.errors returns an ErrorDict (subclass of dict) while f.errors.items() returns a list.