Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Profanity(Illegal words) words validation for a Text Box


I am using SharePoint as a data source and have a multiple lines text box field where user inputs his/her description about a person in the PowerApp Form. Field Name is "Recognition Text". How to validate the field to check if the users inputs any of the bad words like "Stupid","Idiot","Stupidity" etc.,  If the user inputs any of these bad words I want to disable the Submit button.


Note: I am able to achieve this functionality for a single bad word using IsMatch(DataCardValue4.Text, "Stupid", Contains & IgnoreCase) but I am not able to achieve this for multiple words with Or logic.. Help me on this!


Hi @SumanthDundi7 


You can use a regular expression:

Annotation 2020-05-05 121214.png

The expression will check if the Text box contains "dog" or "penguin" and it will disable the button, you can include more words separated by "|" as shown in the picture above. It is important to notice, that it will be an exact match, so Dog with a capital D is not going to be recognized on this scenario, you will need to add all the variations of the words that you want to identify.


Best Regards


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

If this post helps you give a :thumbs_up: and if it solved your issue consider Accept it as the solution

Hi @chsanche , In my case below, If user types word "Assets" which is matching with one of my profanity words, the error message is showing up! Can you please help me on this!


IsMatch(RichTextEditor2_1.HtmlText,"(Stupid|Idiot|Bloody|**bleep**|**bleep**|Sex|Ass)", Contains & IgnoreCase )



Hi @SumanthDundi7  


Remove the option "Contains" and just have IgnoreCase. this will look for exact matches.

IsMatch(RichTextEditor2_1.HtmlText,"(Stupid|Idiot|Bloody|**bleep**|**bleep**|Sex|Ass)", Contains & IgnoreCase )

Hi @rubin_boer , Removing "Contains" is not showing the error message at all. 

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (47,604)