From 80faca13a6fff5e97646421bc0d950f060249b7d Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sat, 29 May 2021 19:14:33 +0300 Subject: [PATCH] Adopt to new yiisoft/validator --- src/Contact/ContactForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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())], ]; } }