Opened 7 years ago

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

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

Component: UncategorizedDocumentation
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 7 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