diff --git a/library/Notifications/Web/Form/ContactForm.php b/library/Notifications/Web/Form/ContactForm.php index 980a30231..e97e1cfd9 100644 --- a/library/Notifications/Web/Form/ContactForm.php +++ b/library/Notifications/Web/Form/ContactForm.php @@ -287,7 +287,11 @@ private function addAddressElements(): void $this->addElement($address); foreach ($plugins as $type => $label) { - $element = $this->createElement('text', $type, ['label' => $label]); + $element = $this->createElement('text', $type, [ + 'label' => $label, + 'validators' => [new StringLengthValidator(['max' => 255])] + ]); + if ($type === 'email') { $element->addAttributes(['validators' => [new EmailAddressValidator()]]); }