From f62374c9176ab072cff2c8fd39371a8def620ad3 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 3 Dec 2024 11:19:09 +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..12f02c1a6 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\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..b52ababfb 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\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;