Refs #28192 -- Made MultiValueField/ComboField fields argument required as documented.
This commit is contained in:
parent
1f2e4f9cfe
commit
8e752d8437
|
@ -918,7 +918,7 @@ class ComboField(Field):
|
||||||
"""
|
"""
|
||||||
A Field whose clean() method calls multiple Field clean() methods.
|
A Field whose clean() method calls multiple Field clean() methods.
|
||||||
"""
|
"""
|
||||||
def __init__(self, fields=(), *args, **kwargs):
|
def __init__(self, fields, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
# Set 'required' to False on the individual fields, because the
|
# Set 'required' to False on the individual fields, because the
|
||||||
# required validation will be handled by ComboField, not by those
|
# required validation will be handled by ComboField, not by those
|
||||||
|
@ -960,7 +960,7 @@ class MultiValueField(Field):
|
||||||
'incomplete': _('Enter a complete value.'),
|
'incomplete': _('Enter a complete value.'),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, fields=(), *args, require_all_fields=True, **kwargs):
|
def __init__(self, fields, *args, require_all_fields=True, **kwargs):
|
||||||
self.require_all_fields = require_all_fields
|
self.require_all_fields = require_all_fields
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
for f in fields:
|
for f in fields:
|
||||||
|
|
Loading…
Reference in New Issue