From 668610941c654e0a5be5cc7262684fbbdd64884b Mon Sep 17 00:00:00 2001 From: Martijn Date: Mon, 16 Dec 2013 17:07:33 +0100 Subject: [PATCH] File validate should have extend hook Currently you can't add validation rules to File thru a DataExtension. This fixes this issue. --- filesystem/File.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filesystem/File.php b/filesystem/File.php index 026a7bf63..4ee662ab9 100644 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -890,7 +890,9 @@ class File extends DataObject { // We aren't validating for an existing "Filename" on the filesystem. // A record should still be saveable even if the underlying record has been removed. - return new ValidationResult(true); + $result = new ValidationResult(true); + $this->extend('validate', $result); + return $result; } /**