Skip to content

Commit

Permalink
API Rename validator classes
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 3, 2024
1 parent de2d84c commit f62374c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/Forms/EditorEmailLinkFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions code/Forms/EditorExternalLinkFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f62374c

Please sign in to comment.