Skip to content

Commit

Permalink
Only for input widgets.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed Jun 3, 2016
1 parent 5eb92a6 commit 6a7c3e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/grokcore/formlib/formlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""

from zope.interface.interfaces import IInterface
from zope.formlib.interfaces import IInputWidget
from zope.schema.interfaces import IField
from grokcore.content import ObjectEditedEvent
import zope.event
Expand Down Expand Up @@ -50,6 +51,8 @@ def success(self, data):
def ensure_required_fields_have_input(widgets, data):
errors = []
for widget in widgets:
if not IInputWidget.providedBy(widget):
continue
if not widget.context.required or widget.hasInput():
continue
name = widget.context.__name__
Expand Down

0 comments on commit 6a7c3e2

Please sign in to comment.