diff --git a/src/Contact/ContactForm.php b/src/Contact/ContactForm.php index 0d61003c6..0297d54fb 100644 --- a/src/Contact/ContactForm.php +++ b/src/Contact/ContactForm.php @@ -36,10 +36,10 @@ public function getFormName(): string public function getRules(): array { return [ - 'name' => [new RequiredHtmlOptions(new Required())], - 'email' => [new RequiredHtmlOptions(new Required()), new EmailHtmlOptions(new Email())], - 'subject' => [new RequiredHtmlOptions(new Required())], - 'body' => [new RequiredHtmlOptions(new Required())], + 'name' => [new RequiredHtmlOptions(Required::rule())], + 'email' => [new RequiredHtmlOptions(Required::rule()), new EmailHtmlOptions(Email::rule())], + 'subject' => [new RequiredHtmlOptions(Required::rule())], + 'body' => [new RequiredHtmlOptions(Required::rule())], ]; } }