diff --git a/frontend/src/app/streams/create/page.tsx b/frontend/src/app/streams/create/page.tsx index 1fbec085..be8187c6 100644 --- a/frontend/src/app/streams/create/page.tsx +++ b/frontend/src/app/streams/create/page.tsx @@ -85,6 +85,13 @@ export default function CreateStreamPage() { } }; + // Inline validation feedback for the amount field. validateAmountInput + // returns an error message when invalid and null when valid. Only show it + // once the user has typed something — the empty case is handled on submit. + const amountError = formData.amount + ? validateAmountInput(formData.amount, TOKEN_DECIMALS) + : null; + return (
- Amount must be greater than 0 with max {TOKEN_DECIMALS} decimals -
+ {amountError && ( +{amountError}
)}