diff --git a/code/BasicFieldsTestPage.php b/code/BasicFieldsTestPage.php index ef5a54b..96fba9e 100644 --- a/code/BasicFieldsTestPage.php +++ b/code/BasicFieldsTestPage.php @@ -33,6 +33,7 @@ use SilverStripe\Forms\CompositeField; use SilverStripe\Forms\Validation\RequiredFieldsValidator; use SilverStripe\Forms\HTMLReadonlyField; +use SilverStripe\Core\Validation\ValidationResult; class BasicFieldsTestPage extends TestPage { @@ -402,7 +403,7 @@ public function getCMSValidator() return new RequiredFieldsValidator('Required'); } - public function validate() + public function validate(): ValidationResult { $result = parent::validate(); if (!$this->Validated || $this->Validated < 1 || $this->Validated > 3) { diff --git a/code/multitab-validation/MultiTabPage.php b/code/multitab-validation/MultiTabPage.php index a3572c2..d068c52 100644 --- a/code/multitab-validation/MultiTabPage.php +++ b/code/multitab-validation/MultiTabPage.php @@ -6,6 +6,7 @@ use SilverStripe\Forms\EmailField; use SilverStripe\Forms\Validation\RequiredFieldsValidator; use SilverStripe\Forms\TextField; +use SilverStripe\Core\Validation\ValidationResult; if (!class_exists(Page::class)) { return; @@ -59,7 +60,7 @@ public function getCMSValidator() ]); } - public function validate() + public function validate(): ValidationResult { $result = parent::validate();