Don't add unknown field errors if allow_unknown_form_fields is set

This commit is contained in:
Doug Tabuchi 2012-03-27 19:06:32 -04:00
parent e53c819cc7
commit 2e74d379e4

View File

@ -168,6 +168,7 @@ class FormResource(Resource):
if not key.startswith('__')
)
if not self.allow_unknown_form_fields:
# Add any unknown field errors
for key in unknown_fields:
field_errors[key] = [u'This field does not exist.']