Opened 8 years ago

Closed 8 years ago

#26528 closed Cleanup/optimization (fixed)

Allow model/form Field validators kwarg to be any iterable

Reported by: Loic Bistuer Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Requiring a list is a side effect of concatenating the validators kwarg with the field's default_validators which happens to be a list.

Requiring a specific type of iterables is not very pythonic.

Change History (3)

comment:2 by Tim Graham, 8 years ago

Component: UncategorizedDatabase layer (models, ORM)
Summary: Fields' validators kwarg must be list.Allow model/form Field validators kwarg to be any iterable
Triage Stage: UnreviewedReady for checkin

comment:3 by Loïc Bistuer <loic.bistuer@…>, 8 years ago

Resolution: fixed
Status: newclosed

In a885bca:

Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for form/model fields.

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