diff --git a/code/Forms/InternalLinkFormFactory.php b/code/Forms/InternalLinkFormFactory.php index 045c695a24..356fa97670 100644 --- a/code/Forms/InternalLinkFormFactory.php +++ b/code/Forms/InternalLinkFormFactory.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; use SilverStripe\Forms\TreeDropdownField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; /** * Provides a form factory for inserting internal page links in a HTML editor @@ -56,7 +56,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;