First, hello, we want to prevent the use of profanity in the chat section of our app can you help ? We would appreciate it if you could help in the design and Code Section thanks in advance.
Create a list of all disallowed words.
When a user types their message and presses the βsendβ button, check the message for any disallowed words from the list.
If there are none then let the message be sent. If there are disallowed words then either censor them or tell the user to delete them.
Well, how can we do this ?
Step 1: Create a list of disallowed words.
Step 2: When a user presses βSendβ compare each word in their message against the list of disallowed words.
Step 3: If there are no disallowed words then send the message. If there are disallowed words then do not send the message and alert the user in a manner of your choice.
2 Likes
Thanks I'll try to write their code