mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
ee336c13d9
commit
668610941c
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user