Problem
Currently there is zero validation before an invoice is saved -
locally or to Firebase. A user can save a completely empty invoice
with no name, no vendor, no amount. This causes silent data quality
issues and corrupted invoice records.
Proposed Fix
Add a client-side validation service that runs before any save
operation and checks:
- Invoice has a meaningful name (not empty or "default")
- Invoice content is not empty
- Warns if key fields appear unfilled
Files to change
- New file: src/services/InvoiceValidator.ts
- Edit: src/components/Menu/Menu.tsx (call validator before save)
Related
Part of the Co-Pilot validation work in Issue #37
Problem
Currently there is zero validation before an invoice is saved -
locally or to Firebase. A user can save a completely empty invoice
with no name, no vendor, no amount. This causes silent data quality
issues and corrupted invoice records.
Proposed Fix
Add a client-side validation service that runs before any save
operation and checks:
Files to change
Related
Part of the Co-Pilot validation work in Issue #37