Skip to content

[FE] Allow no more than two decimal places in the Raise the limit form #429

Description

@mshkkkkk

Summary
The form displays the spent amount with two decimal places but allows the user to enter a new limit with four. For example, it shows $0.60 spent, yet 0.6001 and 0.6002 are rejected while 0.6003 is accepted. The user cannot tell which four-digit value will work from the amount shown.
Limit input in this form to cents so the allowed input matches the displayed money format.

Requirements

  • Allow at most two digits after the decimal point in the New limit field.
  • Show an inline validation message when the user enters more than two digits.
  • Do not submit an invalid value.
  • Keep the existing checks that the new limit must be higher than the current limit and the amount already spent.
  • Continue storing and calculating actual model costs at their existing precision.

Acceptance Criteria

  • The New limit field accepts an amount with no decimal places or with one or two decimal places.
  • If the user enters three or more decimal places, an inline validation message appears and no request is sent.
  • The validation message disappears after the user corrects the value.
  • A value with a valid format can be submitted if it also passes the existing budget checks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfrontendFrontend application

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions