diff --git a/code/FileAttachmentField.php b/code/FileAttachmentField.php index db89ea8..ab845cd 100644 --- a/code/FileAttachmentField.php +++ b/code/FileAttachmentField.php @@ -298,7 +298,10 @@ public function setMultiple($bool) { */ public function setMaxFilesize($num) { $this->settings['maxFilesize'] = $num; - + $validator = $this->getValidator(); + if ($validator) { + $validator->setAllowedMaxFileSize($num.'m'); + } return $this; }