Skip to content

feat: add input-side incident validation before PDF fill#304

Open
geoffkats wants to merge 1 commit intofireform-core:mainfrom
geoffkats:feat/input-incident-validation
Open

feat: add input-side incident validation before PDF fill#304
geoffkats wants to merge 1 commit intofireform-core:mainfrom
geoffkats:feat/input-incident-validation

Conversation

@geoffkats
Copy link

@geoffkats geoffkats commented Mar 20, 2026

Description

Adds input-side validation for required incident fields (incident_type, location, time) before PDF generation to prevent incomplete data from entering the fill pipeline.

Fixes #305

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests: 27 test cases covering valid input, missing fields, empty values, whitespace-only values, and invalid input types
  • Integration: Validator integrated into FileManipulator pipeline
  • Python 3.14.2 environment verified

Test Configuration:

  • Python: 3.14.2
  • Test Suite: pytest
  • Command: .venv\Scripts\python.exe -m pytest tests/test_validator.py -v
  • Result: 27/27 PASSED

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Related

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.

[FEAT]: Add input-side incident data validation gate

1 participant