fast icon indicating copy to clipboard operation
fast copied to clipboard

Fix: Exponential Notation in NumberField

Open rizwan3d opened this issue 1 year ago • 2 comments

The number field cautiously accepts multiple instances of "e," whereas the number system only permits a single occurrence of the same.

🎫 Issues

#6251

📑 Test Plan

11e1111 -> 11e1111 11e+1111 -> 11e+1111 11e-1111 -> 11e-1111 11e11.11 -> 11e1111 11e+11.11 -> 11e+1111 11e-11.11 -> 11e-1111 11e11e -> 11e11 11e111e1e1e1e1e1 -> 11e11111111 e -> empty 11e -> 11 e11 -> 0e11

✅ Checklist

General

  • [ ] I have included a change request file using $ yarn change
  • [X] I have added tests for my changes.
  • [X] I have tested my changes.
  • [ ] I have updated the project documentation to reflect my changes.
  • [ ] I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

rizwan3d avatar Nov 19 '23 07:11 rizwan3d

I'd like to see a solution that allows for typing an exponential number as well - this only allows for programmatic insertion or copy-pasting into the field.

radium-v avatar Nov 27 '23 05:11 radium-v

@rad

I'd like to see a solution that allows for typing an exponential number as well - this only allows for programmatic insertion or copy-pasting into the field.

Updated, can you please review it.

rizwan3d avatar Nov 28 '23 07:11 rizwan3d

Unfortunately, as part of #6951 we are closing out all outstanding foundation PRs and I believe this one was on hold due to the potential issues with using regex in this situation so it will be closed for now, I would suggest creating a custom element with this capability.

janechu avatar Jun 14 '24 17:06 janechu