1. toscawidgets
  2. tw2.forms

Commits

Ralph Bean  committed c4fd6b6

Opportunity for ListLengthValidator in MultipleSelection widgets

  • Participants
  • Parent commits 2f66017
  • Branches default

Comments (0)

Files changed (1)

File tw2/forms/widgets.py

View file
         value = value or []
         if not isinstance(value, (list, tuple)):
             value = [value]
+        if self.validator:
+            self.validator.validate_python(self.validator.to_python(value))
         if self.item_validator:
             value = [twc.safe_validate(self.item_validator, v) for v in value]
         self.value = [v for v in value if v is not twc.Invalid]