Friendly app-level validation for a RANGE with end-before-start #678
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Follow-up surfaced in the review of PR #677 (Phase 4 date rendering, #666) — Sara (QA).
A document with
meta_date_precision = RANGEmust havemeta_date_end >= meta_date. This is already enforced at the database layer by theCHECKconstraint added in the V69 migration (#671), so an invalid range cannot be persisted — but the application currently has no friendly validation: an end-before-start edit fails with a rawDataIntegrityViolationrather than a clear field-level error.Suggested approach
DocumentUpdateDTO) that rejectsmeta_date_end < meta_datefor RANGE precision with a clearErrorCode+ localized message, before it reaches the DB.WhoWhenSection) so the user sees an inline error.Out of scope / notes