Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change add funds input to number type that only accepts integers #7628

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Apr 1, 2025

Description

This PR changes the input field for adding funds on the billing page from a text input to a number input that only accepts integers.

Changes

  • Changed the input type from "text" to "number" in the PaymentForm component
  • Added min, max, and step attributes to ensure only integers are accepted
  • Updated the SettingsInput component to support these new attributes
  • Updated the validation logic to check for integers
  • Updated the tests to reflect these changes

Testing

Updated existing tests to verify the new behavior.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:8bfdfdd-nikolaik   --name openhands-app-8bfdfdd   docker.all-hands.dev/all-hands-ai/openhands:8bfdfdd

Copy link
Contributor

@malhotra5 malhotra5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants