Skip to content

Commit

Permalink
Merge pull request #1864 from creative-commoners/pulls/3/valid
Browse files Browse the repository at this point in the history
API Rename validator classes
  • Loading branch information
GuySartorelli authored Dec 10, 2024
2 parents d6efcf3 + 9ebe7f8 commit 53b1acc
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\Validation\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\Validation\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 53b1acc

Please sign in to comment.