From 450bb24eb70121900c9ab4b6835e5c93264e3119 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Mon, 25 May 2015 21:36:05 +0200 Subject: [PATCH] Don't try to validate missing but required fields. --- src/scriptform.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scriptform.py b/src/scriptform.py index 65bfe98..fcc22b2 100755 --- a/src/scriptform.py +++ b/src/scriptform.py @@ -414,6 +414,10 @@ class FormDefinition: for field in self.fields: field_name = field['name'] if field_name == 'form_name': + # Skip the field containing the name of the form + continue + if field_name in errors: + # Skip fields that are required but missing, since they can't be validated continue try: v = self._field_validate(field_name, form_values)