Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/mkdocs/form/submit_timer.md

This file was deleted.

20 changes: 18 additions & 2 deletions docs/mkdocs/form/honeypot.md → docs/mkdocs/form_types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# HoneypotType Field
# Form Types

This bundle adds two new form types: `HoneypotType` and `SubmitTimerType`. You can add them to your form either
via a profile in `config/packages/antispam.yaml`. Or, if you want to fine-tune their rendering, you can add
them manually to your form:

```php
use Omines\AntiSpamBundle\Form\Type\HoneypotType;

$builder->add('email_confirm', HoneypotType::class, ['required' => false, ...]);
```

# `HoneypotType` Field

The `HoneypotType` field is a text field being rendered invisible in your forms. It will raise a form validation error
if any non-empty value is submitted.
Expand All @@ -13,4 +25,8 @@ forms being filled in automatically by automated agents.
```shell
# replace 'FooType' by the class name of your form type
$ php bin/console debug:form FooType
```
```

# `SubmitTimerType` Field

TBD.
4 changes: 2 additions & 2 deletions docs/mkdocs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ The bundle is compatible with PHP 8.2+ and Symfony 6.4 or later in active suppor
This bundle provides you with a ton of methods to easily combat spam through tested and
proven methods:

- **[Honeypot](form/honeypot.md)**: Insert a hidden field in your forms that lures spambots into filling it in.
- **[Submit Timer](form/submit_timer.md)**: Reject forms that have been submitted unfeasibly fast or unrealistically slow.
- **[`HoneypotType`](form_types.md)**: Insert a hidden field in your forms that lures spambots into filling it in.
- **[`SubmitTimerType`](form_types.md)**: Reject forms that have been submitted unfeasibly fast or unrealistically slow.
- **[Banned markup](validator/banned_markup.md)**: Reject text fields containing HTML or UBB tags.
- **[Banned phrases](validator/banned_phrases.md)**: Reject text fields containing signature phrases targeting your site.
- **[Banned scripts](validator/banned_scripts.md)**: Reject text fields that contain too many characters in scripts not
Expand Down