From 9ebe7f84e0d30f003500486b6188ac20db98e82e Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 5 Dec 2024 17:29:03 +1300 Subject: [PATCH] API Rename validator classes --- code/Forms/EditorEmailLinkFormFactory.php | 4 ++-- code/Forms/EditorExternalLinkFormFactory.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;