Skip to content

Commit f5e6757

Browse files
authored
remove array check (#7)
* remove array check * Bump package version
1 parent cf49690 commit f5e6757

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

js/validators/FileSizeValidator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class FileSizeValidator extends Validator
1919

2020
validate(value)
2121
{
22-
if(value[0] && value[0].size > (this._maxSize * 1024 * 1024))
22+
if(value.hasOwnProperty('size') && value.size > (this._maxSize * 1024 * 1024))
2323
{
2424
return ValidationResponse.error(['File upload cannot be more than ' + this._maxSize + 'mb in size']);
2525
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@packaged/validate",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"main": "index.js",
55
"repository": "git@github.com:packaged/validate",
66
"author": "Tom Kay <oridan82@gmail.com>",

0 commit comments

Comments
 (0)