react-component / react-component/input-number

Prevent non-numeric input

Open
#614 4 comments 2 reactions 1 assignee View on GitHub

@MadCcc is already working on this.

Since Jan 6, 2024.

Dominant language
TypeScript
Stars
323
Forks
188
Avg merge
20h 3m
Merged PRs (30d)
1

Description

Is there a way to prevent non-numeric input entirely, rather than stripping it out?

For example I can type "foo" into the input, and it's displayed as a value, but then stripped when I blur the field. I need to prevent those characters from being typed in at all. I tried pattern/inputMode just in case but neither do what I need.

Is this possible?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.