Announcements
I have a form with a required text field. It throws an error if you try to submit the form but there is no value in it. That's fine but I want to prevent a user from submitting the form if the text field does not contain a 5-7 digit integer much like you prevent the form from being submitted if the field was blank. At the same time, I want to show an error message if the field does not contain a 5-7 digit. How can I do this?
Hi @futr_vision ,
You could use the test
Value(YourTextInput.Text) > 9999 && Value(YourTextInput.Text) < 10000000
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Where would I be using this formula and how would I trigger the error or does that happen natively if the condition is not met?
@futr_vision ,
There would be several options - example OnChange of the Text Box
If( Value(Self.Text) < 10000 || Value(Self.Text) > 9999999 Reset(Self); Notify("Must contain . . . . .") )
Adding to the OnChange doesn't actually do anything for me. No errors either. How would I troubleshoot this?
Please see revised code
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.
WarrenBelz 366 Most Valuable Professional
11manish 184
MS.Ragavendar 99 Super User 2026 Season 1