diff --git a/code/Forms/EditorEmailLinkFormFactory.php b/code/Forms/EditorEmailLinkFormFactory.php index 25a3eba0f..918848774 100644 --- a/code/Forms/EditorEmailLinkFormFactory.php +++ b/code/Forms/EditorEmailLinkFormFactory.php @@ -5,7 +5,7 @@ use SilverStripe\Forms\EmailField; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; class EditorEmailLinkFormFactory extends LinkFormFactory { @@ -38,7 +38,7 @@ protected function getFormFields($controller, $name, $context) protected function getValidator($controller, $name, $context) { if ($context['RequireLinkText']) { - return RequiredFields::create('Text'); + return RequiredFieldsValidator::create('Text'); } return null; diff --git a/code/Forms/EditorExternalLinkFormFactory.php b/code/Forms/EditorExternalLinkFormFactory.php index 9b552817f..d82cf83e9 100644 --- a/code/Forms/EditorExternalLinkFormFactory.php +++ b/code/Forms/EditorExternalLinkFormFactory.php @@ -5,7 +5,7 @@ use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; class EditorExternalLinkFormFactory extends LinkFormFactory { @@ -36,7 +36,7 @@ protected function getFormFields($controller, $name, $context) protected function getValidator($controller, $name, $context) { if ($context['RequireLinkText']) { - return RequiredFields::create('Text'); + return RequiredFieldsValidator::create('Text'); } return null;