hi,
we have a validation like allow only number and "," as per functionality.
and this has to work on click of save button only.
used Number.isnan but its not validating the +1 kind of input since internally treating as number.
help me on this
hi,
we have a validation like allow only number and "," as per functionality.
and this has to work on click of save button only.
used Number.isnan but its not validating the +1 kind of input since internally treating as number.
help me on this
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gowtham CpPosted Sep 2, 2024, 2:16 AM
Hi ,
To ensure the input only contains numbers and commas when clicking the "Save" button, use a regular expression to validate the input. Here's how:
Hope it helps!
Prasad RaveendranPosted Sep 2, 2024, 3:42 AM
If you'd like to validate the input without using regular expressions, you can take a more manual approach by checking each character in the input string to ensure it’s either a digit or a comma.
Here’s how you can do this:
Murali PPosted Sep 2, 2024, 3:39 AM
Thanks a lot goutham for ur help... It saves my day