FieldList max_entries
Closed this issue · 1 comments
rickwierenga commented
The max_entries
parameter of fieldlist is document as "accept no more than this many entries as input, even if more exist in formdata".
I would interpret this as meaning that a list of length max_entries
is allowed, but this is not the case:
assert (
not self.max_entries or len(self.entries) < self.max_entries
), "You cannot have more than max_entries entries in this FieldList"
https://github.com/wtforms/wtforms/blob/master/src/wtforms/fields/list.py#L155-L157
I feel like the documentation or implementation (preferred) should change. Can I go ahead and make a PR?
rickwierenga commented
Turns out it is actually correct, my bad...