Skip to content

Commit

Permalink
Merge pull request #1877 from creative-commoners/pulls/3.0/validation…
Browse files Browse the repository at this point in the history
…-interface

API Update validate signature
  • Loading branch information
GuySartorelli authored Dec 17, 2024
2 parents b30db1e + 3a25374 commit b1a4a65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/php/LeftAndMainTest/MyTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Core\Validation\ValidationResult;

class MyTree extends DataObject implements TestOnly
{
Expand All @@ -15,7 +16,7 @@ class MyTree extends DataObject implements TestOnly
'Content' => 'Varchar'
];

public function validate()
public function validate(): ValidationResult
{
$validationResult = parent::validate();
if ($this->Content === static::INVALID_CONTENT) {
Expand Down

0 comments on commit b1a4a65

Please sign in to comment.