Skip to content

[Frontend] Consistent amount input validation with inline and accessible errors #20

@grantfox-oss

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

Lend and repay compute a precisionError and disable the submit button, but the validation feedback is inconsistent and not always announced to assistive tech. Users see a dead button with no explanation. Amount inputs should validate precision, range, and balance inline.

Acceptance criteria

  • Shared amount input that validates precision (via amount.ts), positive range, and available balance
  • Inline error text tied to the input with aria-invalid and aria-describedby
  • Disable submit only alongside a visible reason
  • Reuse across lend, repay, send remittance, and request loan

Files to touch

  • src/app/[locale]/lend/LendPageClient.tsx, src/app/[locale]/repay/[loanId]/page.tsx, src/app/[locale]/send-remittance/, src/app/[locale]/request-loan/page.tsx
  • src/app/utils/amount.ts
  • src/app/components/global_ui/ (shared input)

Out of scope

  • Currency conversion display

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions