Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Rename validator classes #1519

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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\Validation\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\Validation\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\Validation\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
2 changes: 1 addition & 1 deletion code/Forms/UploadField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use SilverStripe\Forms\FileHandleField;
use SilverStripe\Forms\FileUploadReceiver;
use SilverStripe\Forms\FormField;
use SilverStripe\Forms\Validator;
use SilverStripe\Forms\Validation\Validator;
use SilverStripe\ORM\DataObject;
use SilverStripe\Model\List\SS_List;

Expand Down
Loading