diff --git a/src/StringTagField.php b/src/StringTagField.php index 81abe03..d1786ff 100644 --- a/src/StringTagField.php +++ b/src/StringTagField.php @@ -6,6 +6,7 @@ use SilverStripe\Control\Controller; use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\Validator; use SilverStripe\Model\List\ArrayList; @@ -372,13 +373,11 @@ protected function getTags($term) /** * DropdownField assumes value will be a scalar so we must * override validate. This only applies to Silverstripe 3.2+ - * - * @param Validator $validator - * @return bool */ - public function validate($validator) + public function validate(): ValidationResult { - return $this->extendValidationResult(true, $validator); + // return $this->extendValidationResult(true, $validator); + return new ValidationResult; } /** diff --git a/src/TagField.php b/src/TagField.php index 317635c..4c57639 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -17,6 +17,7 @@ use SilverStripe\ORM\Relation; use SilverStripe\Model\List\SS_List; use SilverStripe\Model\ArrayData; +use SilverStripe\Core\Validation\ValidationResult; /** * Provides a tagging interface, storing links between tag DataObjects and a parent DataObject. @@ -566,13 +567,12 @@ protected function getTags($term) /** * DropdownField assumes value will be a scalar so we must * override validate. This only applies to Silverstripe 3.2+ - * - * @param Validator $validator - * @return bool */ - public function validate($validator) + public function validate(): ValidationResult { - return $this->extendValidationResult(true, $validator); + // TODO: temporary code + return new ValidationResult; + // return $this->extendValidationResult(true, $validator); } /**