What does it do?
This plugin allows you to validate a field’s value against the WordPress Comment Blacklist validation. This option can be set for a single field, multiple fields, all fields within a form. If the field fails validation it will display an error to the end user stating that their field contains blacklisted words.
- Validate fields against blacklist.
Prevent form submissions that include blacklisted words.
- Validate against a single field, multiple fields, or all fields.
Flexible blacklisting to match your form’s needs.
- Integrates with the built-in WordPress Comment Blacklist.
Use the same blacklist for both comments and forms.
- Reject submissions silently with a honeypot.
Reject entries without notifying the user that their entry has been blocked.
- Automatic updates.
Get updates and the latest features right in your dashboard.
- Awesome support.
We’re here to help! And we mean it.
- How do I enable this functionality?
- Feature Details
- Known Limitations
How do I enable this functionality?
Since there are two options for this perk, field and form, we will do them in separate categories.
To activate blacklist validation for a single field, navigate to the Perks tab and check Validate Against WordPress “Comment Blacklist”.
To validate against every field on the form, navigate to the “Restrictions” section within the form settings area. Check Validate Against WordPress “Comment Blacklist”.
If a single field has the Blacklist setting enabled then that field will take the end-users submitted value and check it against that of the WordPress Comment Blacklist words.
If the form wide Blacklist setting is enabled then it loops through all fields within the form when an end-user submits the form. It then checks the fields to see if they are supported by this perk. After grabbing a list of all supported fields it then validates the fields against the WordPress Comment Blacklist words.
WordPress Comment Blacklist
To specify blacklisted words, navigate to Settings > Discussion. Scroll down to “Comment Blocklist” and enter any words you wish to prevent from being submitted on this form, one per line.
You can specify IP addresses in the Comment Blocklist and GP Comment Blacklist will prevent submissions from that IP.
Automate Blacklist Management
Save yourself time and beef up your blacklist by supplementing the list of keywords with this repository. You can add the list to your site by pasting it into the Comment Blocklist, or you can use any of the supported plugins that automates adding new keywords.
Use the gpb_enable_honeypot hook to silently reject submissions while making it appear successful. This discourages spammers from attempting to find loopholes in your blacklist to exploit.
Due to the nature of WordPress’ Comment Blacklist feature, it will match words inside of other words. So let’s say you wanted to ban the word Race it would also ban any words with race in it, like Racer.
How can I change the text of the validation error message?
You can change the text of the validation error by using the gpb_validation_message hook.