Announcements
I have a gallery where I am using a text box that accept only number, I want to restrict user upto 2 decimal places while entering the number , is there any way?
Hi @dipanjan2021,
Do you want to restrict 2 decimal places while entering the numbers?
You can set the OnChange of text input as:
If(!IsMatch(TextInput1.Text,"\d+(\.\d{0,2})?"),Notify("Please enter two decimal places"),NotificationType.Error)
Best Regards,
Kyrie
Hi thanks for the quick response
My actual requirement is if user put any number beyond 2 digits after decimal point it should not reflect
@dipanjan2021,
What do you mean about it should not reflect?
If the number beyond 2 decimal places then clear the text input?
If so, please try this.
If(!IsMatch(TextInput1.Text,"\d+(\.\d{0,2})?"),Reset(TextInput1))
No actually not like that. 2 digits after decimal point it will stop taking input although deletion is possible
Sorry, your request cannot be fulfilled!
You can clear the test input and notify something.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 236 Super User 2026 Season 2
WarrenBelz 207 Most Valuable Professional
Mohsin Ali 169