Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • yes but this also accepts space in textbox.Space should not be accepted in textbox Commented Jul 5 at 16:36
  • The clean way to do this is to validate if the user input is valid, if not, you should show a warning to the user. What you can also do, is change the textbox to type="number" so that it doesn't accept anything else besides numbers. but even in that case you need to warn the user if there are more than two decimal places Commented Jul 7 at 7:45
  • still it is taking space Commented Jul 9 at 10:23