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

TextField type Number should not allow " +, -, e " in middle of number #20437

Closed
2 tasks done
ims7inc opened this issue Apr 6, 2020 · 3 comments
Closed
2 tasks done
Labels
component: text field This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists support: Stack Overflow Please ask the community on Stack Overflow

Comments

@ims7inc
Copy link

ims7inc commented Apr 6, 2020

TextField type Number should not allow " +, -, e " in middle of number

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When I entering numbers in TextField type number it is allowing minus(-), plus(+), and 'e' symbols but i am getting empty string instead of target value

// initial state value = "";
<TextField
id="standard-number"
label="Number"
type="number"
value={this.state.value}
onChange={(event)=> this.setState({ value: event.target.value }) }
/>

Expected Behavior 🤔

Number filed should not allow +, - & e in middle of any number

@eps1lon eps1lon added the support: Stack Overflow Please ask the community on Stack Overflow label Apr 6, 2020
@support
Copy link

support bot commented Apr 6, 2020

👋 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@support support bot closed this as completed Apr 6, 2020
@eps1lon
Copy link
Member

eps1lon commented Apr 6, 2020

This is expected for <input type="number" />.

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Apr 6, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 6, 2020

Duplicate of #10582

@oliviertassinari oliviertassinari added the component: text field This is the name of the generic UI component, not the React module! label May 11, 2020
@oliviertassinari oliviertassinari marked this as a duplicate of #10582 May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

3 participants