Receive Clear Feedback When Receipt Is Required But Missing
The receipt threshold configuration is org-specific (e.g., 100 NOK). When the peer mentor enters an expense amount that crosses this threshold, the form dynamically indicates that a receipt is required — before the user attempts to submit. This proactive validation reduces cognitive load by surfacing the requirement in context. The indicator uses plain language, high-contrast styling, and is announced by screen readers when the threshold is crossed. The threshold-validation logic is encapsulated server-side in an edge function to allow org administrators to update thresholds without app releases.
User Story
Acceptance Criteria
- Given I enter an expense amount above the org-configured receipt threshold, When the amount field loses focus, Then a visual indicator appears on the receipt attachment section showing 'Receipt required for amounts over [X] NOK'
- Given the threshold indicator is shown, When a screen reader is active, Then the threshold requirement is announced via an accessibility live region
- Given I have not yet attached a receipt and the amount is above threshold, When I tap the Submit button, Then submission is blocked and the receipt section is scrolled into view with an error state highlighted
- Given the org administrator changes the receipt threshold in configuration, When I next open the expense form, Then the updated threshold value is reflected without requiring an app update
- Given my expense amount drops below the threshold after editing, When the validation is re-evaluated, Then the receipt requirement indicator disappears and the form can be submitted without a receipt
- Given a receipt is attached and the amount is above threshold, When I view the form, Then the receipt section shows a success state indicating the requirement is satisfied
Business Value
Proactive threshold validation prevents submission errors and reduces coordinator workload from incomplete claims. For peer mentors with cognitive accessibility needs — a core user group per NHF's requirements — clear in-context guidance is essential. Org-configurable thresholds via edge functions ensure the feature scales across HLF, Blindeforbundet, and future organizations with different reimbursement policies.
Components
- Receipt Attachment Indicator ui
- Receipt Threshold Validator service
- Expense Form BLoC service
- Expense Validation Service service
- Expense Threshold Configuration infrastructure
- Threshold Validation Supabase Edge Function infrastructure
- Plain Language Error Display ui
- Live Region Announcer ui