mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 06:17:07 +00:00
cave areacode requirement enforced
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user