Skip to main content
Inspiring
July 28, 2023
Question

Keystroke validation for a number with optional commas and decimals

  • July 28, 2023
  • 2 replies
  • 1474 views

I'm trying to find a keystroke validation for numbers where commas and decimals (0.000) may be entered. Any help would be appreciated. 

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
July 28, 2023

Why not use one of the built-in options under the Format tab?

Inspiring
July 28, 2023

I would like for the user to be able to enter 100 or 0.100

try67
Community Expert
Community Expert
July 28, 2023

Yes, they can do that with those settings...

Nesa Nurani
Community Expert
Community Expert
July 28, 2023

Allow only numbers, commas and dots.
event.rc = /^[0-9,.]*$/.test(event.change);