[django/django] 128067: Fixed #15511 -- Allow optional fields on ``MultiVa...

1 view
Skip to first unread message

GitHub

unread,
Aug 6, 2013, 8:53:41 AM8/6/13
to django-...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/django/django
Commit: 12806758347dfd63a3cd1bfc0d925c09fdbd9cff
https://github.com/django/django/commit/12806758347dfd63a3cd1bfc0d925c09fdbd9cff
Author: Tai Lee <tai...@3030.com.au>
Date: 2013-08-06 (Tue, 06 Aug 2013)

Changed paths:
M django/forms/fields.py
M docs/ref/forms/fields.txt
M docs/releases/1.7.txt
M tests/forms_tests/tests/test_forms.py

Log Message:
-----------
Fixed #15511 -- Allow optional fields on ``MultiValueField` subclasses.

The `MultiValueField` class gets a new ``require_all_fields`` argument that
defaults to ``True``. If set to ``False``, individual fields can be made
optional, and a new ``incomplete`` validation error will be raised if any
required fields have empty values.

The ``incomplete`` error message can be defined on a `MultiValueField`
subclass or on each individual field. Skip duplicate errors.



Reply all
Reply to author
Forward
0 new messages