diff --git a/package.json b/package.json index 04dce22..62dabf9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@packaged/validate", - "version": "3.1.2", + "version": "3.1.3", "main": "index.js", "repository": "git@github.com:packaged/validate", "author": "Tom Kay ", diff --git a/src/Validators/FileSizeValidator.php b/src/Validators/FileSizeValidator.php index 88107f9..bc2fa4b 100644 --- a/src/Validators/FileSizeValidator.php +++ b/src/Validators/FileSizeValidator.php @@ -36,7 +36,7 @@ public function serialize(): array protected function _doValidate($value): Generator { // Validation - if(array_key_exists('size', $value) && $value['size'] > ($this->_maxSize * 1024 * 1024)) + if(array_key_exists('size', $value) && $value['size'] < ($this->_maxSize * 1024 * 1024)) { yield $this->_makeError("File upload cannot be more than " . $this->_maxSize . "mb in size"); }