Skip to main content

No Profanity

The text of the given (key) shall not contain any profanity.

Parameter table

paramunitrequireddescription
keyyesThe key to check if it contains profanity (key).

Correction

The correction will be applied to the provided (key), wherein the text undergoes conversion to censor the profanity.

The censoring process can be applied in 4 ways and it's up to you on how you want the correction to be applied. The 4 options are the following :-

  • The word is censored entirely , (shit) => (****).
  • The first letter is left as is but the rest is censored, (shit) => (s***).
  • The last letter is left as is but the rest is censored, (shit) => (***t).
  • The first and last letters are left as is but the rest is censored, (shit) => (s**t).

How to setup

The rule verifies whether the text of the given (key) contains any profanity (banned words). If the text meets this criterion the rule will fail.

In that case the correction will be applied based on your choice of replacement. For more info about the correction, please refer to the [correction][#correction] section.

Examples

valuevaliddescription
What is this shit ?The text contains profanity.
It's a good day.The text doesn't contain profanity.