diff --git a/composer.json b/composer.json index 72fdb39..5c7533e 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "silverstripe/framework": "^4.0 || ^5.0" + "silverstripe/framework": "^4.0 || ^5.0 || ^6" }, "support": { "issues": "https://github.com/Rhym/silverstripe-color-field/issues" diff --git a/src/Forms/ColorField.php b/src/Forms/ColorField.php index 0e33731..fad58b7 100644 --- a/src/Forms/ColorField.php +++ b/src/Forms/ColorField.php @@ -2,6 +2,7 @@ namespace RyanPotter\SilverStripeColorField\Forms; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Forms\TextField; use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\View\Requirements; @@ -93,9 +94,9 @@ public function Field($properties = []): DBHTMLText * @param \SilverStripe\Forms\Validator $validator * @return bool */ - function validate($validator): bool + public function validate(): ValidationResult { - return true; + return ValidationResult::create(); } /**