Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin to add validation for create/edit views #104

Merged
merged 9 commits into from
Jul 24, 2023

Conversation

xmedr
Copy link
Collaborator

@xmedr xmedr commented Jul 20, 2023

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 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
    • The document is saved when inputs are correct

@xmedr xmedr marked this pull request as ready for review July 20, 2023 19:36
@xmedr xmedr requested a review from fgregg July 20, 2023 19:36
@xmedr xmedr changed the title Patch/doc form validation Begin to add validation for create/edit views Jul 20, 2023
Copy link
Collaborator

@fgregg fgregg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good. the int checks don't look like they are actually testing ints?

@xmedr xmedr merged commit 4b12313 into master Jul 24, 2023
@xmedr xmedr deleted the patch/doc-form-validation branch July 24, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants