Skip to content

Commit

Permalink
API API Replace getCMSValidator with updateCMSCompositeValidator (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 9, 2025
1 parent dc602fd commit c8517ba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Extensions/WorkflowEmbargoExpiryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use SilverStripe\Forms\LiteralField;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Core\Extension;
use SilverStripe\Forms\Validation\CompositeValidator;
use SilverStripe\ORM\DataQuery;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\FieldType\DBHTMLText;
Expand Down Expand Up @@ -425,14 +426,11 @@ public function getIntroMessage($key)
return $msg;
}

/*
* Validate
*/
public function getCMSValidator()
protected function updateCMSCompositeValidator(CompositeValidator $validator): void
{
$required = new AWRequiredFieldsValidator();
$required->setCaller($this);
return $required;
$validator->addValidator($required);
}

/**
Expand Down

0 comments on commit c8517ba

Please sign in to comment.