Skip to content

Commit 3b36754

Browse files
authored
add email checker validator (#472)
1 parent 7fbad6a commit 3b36754

27 files changed

+545
-114
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ Nothing to tell here, it's just [Symfony](https://symfony.com/doc/current/templa
5454
- [Usage (Rendering Types, Configuration)](docs/0_Usage.md)
5555
- [Headless Mode](docs/1_HeadlessMode.md)
5656
- [SPAM Protection](docs/03_SpamProtection.md)
57-
- [Double-Opt-In Feature](docs/03_SpamProtection.md)
57+
- [Cloudflare Turnstile](docs/03_SpamProtection.md#cloudflare-turnstile)
58+
- [FriendlyCaptcha](docs/03_SpamProtection.md#friendly-captcha)
59+
- [Honeypot](docs/03_SpamProtection.md#honeypot)
60+
- [ReCaptcha V3](docs/03_SpamProtection.md#recaptcha-v3)
61+
- [Email Checker](docs/03_SpamProtection.md#email-checker)
62+
- [Double-Opt-In Feature](docs/04_DoubleOptIn.md)
5863
- [Output Workflows](docs/OutputWorkflow/0_Usage.md)
5964
- [API Channel](docs/OutputWorkflow/09_ApiChannel.md)
6065
- [Email Channel](docs/OutputWorkflow/10_EmailChannel.md)

UPGRADE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Upgrade Notes
22

33
## 5.1.0
4-
- **[SECURITY FEATURE]** Double-Opt-In Feature, read more about it [here](/docs/.md)
4+
- **[SECURITY FEATURE]** Double-Opt-In Feature, read more about it [here](./docs/04_DoubleOptIn.md)
5+
- **[SECURITY FEATURE]** Email Checker Validator [#471](https://github.com/dachcom-digital/pimcore-formbuilder/issues/471), read more about it [here](./docs/03_SpamProtection.md#email-checker)
56
- If you're using a custom form theme, please include the `instructions` type (`{% use '@FormBuilder/form/theme/type/instructions.html.twig' %}`)
67
- **[SECURITY FEATURE]** Add [friendly captcha field](/docs/03_SpamProtection.md#friendly-captcha)
78
- **[SECURITY FEATURE]** Add [cloudflare turnstile](/docs/03_SpamProtection.md#cloudflare-turnstile)
89
- **[BUGFIX]** Use Pimcore AdminUserTranslator for Editable Dialog Box [#450](https://github.com/dachcom-digital/pimcore-formbuilder/issues/450)
910
- **[BUGFIX]** CSV Export: Ignore mail params with empty data [#461](https://github.com/dachcom-digital/pimcore-formbuilder/issues/461)
11+
- **[IMPROVEMENT]** Improve response message context [#416](https://github.com/dachcom-digital/pimcore-formbuilder/issues/416)
1012
- **[IMPROVEMENT]** Improve API OC Field Mapping [#462](https://github.com/dachcom-digital/pimcore-formbuilder/issues/462)
1113
- **[IMPROVEMENT]** Improve json response success message behaviour [#416](https://github.com/dachcom-digital/pimcore-formbuilder/issues/416)
1214
- **[IMPROVEMENT]** Allow custom message in `DynamicMultiFileNotBlankValidator` constraint [#438](https://github.com/dachcom-digital/pimcore-formbuilder/issues/438)

config/install/translations/admin.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"form_builder_validation_constraint.not_blank","Not Blank","NotBlank-Einschränkung"
2929
"form_builder_validation_constraint.dynamic_multi_file_not_blank","Dynamic Multi-File Not Blank","NotBlank-Einschränkung für Multi-Datei Element"
3030
"form_builder_validation_constraint.email","Email-Validation","Email-Validierung"
31+
"form_builder_validation_constraint.email_checker","Email-Checker","Email-Checker"
3132
"form_builder_validation_constraint.length","Length","Länge"
3233
"form_builder_validation_constraint.url","Url","Url"
3334
"form_builder_validation_constraint.regex","Regex","Regex"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
flysystem:
2+
storages:
3+
form_builder.email_checker.storage:
4+
adapter: 'local'
5+
options:
6+
directory: '%kernel.project_dir%/var/tmp/form-builder-email-checker'
7+
8+
form_builder:
9+
validation_constraints:
10+
email_checker:
11+
class: FormBuilderBundle\Validator\Constraints\EmailChecker
12+
label: 'form_builder_validation_constraint.email_checker'
13+
icon_class: form_builder_icon_validation
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
3+
_defaults:
4+
autowire: true
5+
autoconfigure: true
6+
public: false
7+
8+
FormBuilderBundle\Validator\EmailChecker\DisposableEmailDomainChecker:
9+
tags:
10+
- { name: form_builder.validator.email_checker }
11+
12+
FormBuilderBundle\Maintenance\DisposableEmailDomainFetchTask:
13+
arguments:
14+
$logger: '@form_builder.application_logger.email_checker_logger'
15+
tags:
16+
- {name: pimcore.maintenance.task, type: formbuilder_email_checker_disposable_email_domain_fetch }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
3+
form_builder.application_logger.email_checker_logger:
4+
public: true
5+
class: Pimcore\Bundle\ApplicationLoggerBundle\ApplicationLogger
6+
calls:
7+
- [addWriter, ['@Pimcore\Bundle\ApplicationLoggerBundle\Handler\ApplicationLoggerDb']]
8+
- [setComponent, ['form_builder_email_checker']]

config/services/builder.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ services:
99
FormBuilderBundle\Builder\FrontendFormBuilder: ~
1010

1111
# backend form builder
12-
FormBuilderBundle\Builder\ExtJsFormBuilder: ~
12+
FormBuilderBundle\Builder\ExtJsFormBuilder:
13+
arguments:
14+
$translator: '@Pimcore\Bundle\AdminBundle\Translation\AdminUserTranslator'
1315

1416
# form values output applier
1517
FormBuilderBundle\Form\FormValuesOutputApplier: ~

config/services/event.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,4 @@ services:
2727

2828
FormBuilderBundle\EventListener\Admin\AssetListener:
2929
tags:
30-
- { name: kernel.event_subscriber }
31-
32-
FormBuilderBundle\EventListener\Core\CleanUpListener:
33-
tags:
34-
- {name: pimcore.maintenance.task, type: formbuilder_clean_up }
30+
- { name: kernel.event_subscriber }

config/services/maintenance.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
3+
_defaults:
4+
autowire: true
5+
autoconfigure: true
6+
public: false
7+
8+
FormBuilderBundle\Maintenance\CleanUpTask:
9+
tags:
10+
- {name: pimcore.maintenance.task, type: formbuilder_clean_up }

config/services/validator.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,16 @@ services:
2222
FormBuilderBundle\Validator\Constraints\FriendlyCaptchaValidator:
2323
public: false
2424
tags:
25-
- { name: validator.constraint_validator }
25+
- { name: validator.constraint_validator }
26+
27+
FormBuilderBundle\Validator\Constraints\EmailCheckerValidator:
28+
public: false
29+
tags:
30+
- { name: validator.constraint_validator }
31+
32+
#
33+
# Email Checker
34+
35+
FormBuilderBundle\Validator\EmailChecker\EmailCheckerProcessor:
36+
arguments:
37+
$emailChecker: !tagged_iterator form_builder.validator.email_checker

0 commit comments

Comments
 (0)