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 41fbeb8 commit 3901379
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions code/Forms/AssetFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use SilverStripe\Forms\OptionsetField;
use SilverStripe\Forms\PopoverField;
use SilverStripe\Forms\ReadonlyField;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\RequiredFieldsValidator;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Forms\TextField;
Expand Down Expand Up @@ -108,11 +108,11 @@ public function getForm(?RequestHandler $controller = null, $name = FormFactory:
* @param RequestHandler $controller
* @param $formName
* @param $context
* @return RequiredFields
* @return RequiredFieldsValidator
*/
protected function getValidator(?RequestHandler $controller, $formName, $context = [])
{
$validator = new RequiredFields('Name');
$validator = new RequiredFieldsValidator('Name');

return $validator;
}
Expand Down
4 changes: 2 additions & 2 deletions code/Forms/FileFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use SilverStripe\Forms\HeaderField;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\RequiredFieldsValidator;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Forms\TextField;
Expand Down Expand Up @@ -503,7 +503,7 @@ public function getRequiredContext()
* @param RequestHandler $controller
* @param $formName
* @param $context
* @return RequiredFields
* @return RequiredFieldsValidator
*/
protected function getValidator(?RequestHandler $controller, $formName, $context = [])
{
Expand Down
4 changes: 2 additions & 2 deletions code/Forms/RemoteFileFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\OptionsetField;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\RequiredFieldsValidator;
use SilverStripe\Forms\TextField;
use SilverStripe\View\Embed\Embeddable;

Expand Down Expand Up @@ -109,7 +109,7 @@ public function getForm(?RequestHandler $controller = null, $name = RemoteFileFo
$fields = $this->getFormFields($controller, $name, $context);
$actions = $this->getFormActions($controller, $name, $context);

$validator = new RequiredFields();
$validator = new RequiredFieldsValidator();
$form = Form::create($controller, $name, $fields, $actions, $validator);
$form->addExtraClass('form--fill-height');
$form->addExtraClass('form--no-dividers');
Expand Down

0 comments on commit 3901379

Please sign in to comment.