diff options
Diffstat (limited to 'core/forms.py')
-rw-r--r-- | core/forms.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/forms.py b/core/forms.py index 0bcd6ef..b9a8c1f 100644 --- a/core/forms.py +++ b/core/forms.py @@ -149,6 +149,10 @@ class CaveForm(ModelForm): # self._errors["url"] = self.error_class(["This field is required."]) # if cleaned_data.get("url") and cleaned_data.get("url").startswith("/"): # self._errors["url"] = self.error_class(["This field cannot start with a /."]) + if self.data.get("areacode") == "": + self._errors["areacode"] = self.error_class( + ["An areacode, e.g. 1623, is required."] + ) return cleaned_data |