This begins to add validation for create and edit views. This is done through model validators for all fields except geometry, where we're instead catching exceptions raised in both LicenseForm in forms.py and a custom widget in licenses.py
Connects #41
Notes
This does not include the items in #41 that needed updated rules, like township or job_number fields. Any other fields not mentioned in this comment should be good to go.
The fields that do have new validation should still accept existing values with little to no modification.
Testing Instructions
Create/edit a few types of documents with incorrect and correct inputs
Confirm that:
Proper errors display and the document is not saved when incorrect
Overview
This begins to add validation for create and edit views. This is done through model validators for all fields except
geometry
, where we're instead catching exceptions raised in bothLicenseForm
in forms.py and a custom widget in licenses.pyConnects #41
Notes
This does not include the items in #41 that needed updated rules, like
township
orjob_number
fields. Any other fields not mentioned in this comment should be good to go.The fields that do have new validation should still accept existing values with little to no modification.
Testing Instructions