File validate should have extend hook

Currently you can't add validation rules to File thru a DataExtension.
This fixes this issue.
This commit is contained in:
Martijn 2013-12-16 17:07:33 +01:00
parent ee336c13d9
commit 668610941c

View File

@ -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;
}
/**