PHPackages                             jstewmc/validate-file-size - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. jstewmc/validate-file-size

ActiveLibrary[File &amp; Storage](/categories/file-storage)

jstewmc/validate-file-size
==========================

Validate a file's size

v0.1.0(9y ago)019MITPHPPHP ^7.0

Since Aug 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jstewmc/validate-file-size)[ Packagist](https://packagist.org/packages/jstewmc/validate-file-size)[ RSS](/packages/jstewmc-validate-file-size/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

validate-file-size
==================

[](#validate-file-size)

Validate a file's size.

```
use Jstewmc\ValidateFileSize\Validate;

// set the file's name
$filename = '/path/to/foo.php';

// create a three-byte file
file_put_contents($filename, 'foo');

// check the file's size
(new Validate(0, 1))($filename);    // returns false
(new Validate(0, 999))($filename);  // returns true
```

Keep in mind, the *min* and *max* sizes are inclusive.

That's about it!

Author
------

[](#author)

[Jack Clayton](mailto:clayjs0@gmail.com)

License
-------

[](#license)

[MIT](https://github.com/jstewmc/validate-file-size/blob/master/LICENSE)

Version
-------

[](#version)

### 0.1.0, August 24, 2017

[](#010-august-24-2017)

- Initial release

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3596d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50fecae0a7fd2119681bc133e496e7166b01a59f850a3c909e100bd427c6b28b?d=identicon)[Jstewmc](/maintainers/Jstewmc)

---

Top Contributors

[![jstewmc](https://avatars.githubusercontent.com/u/1192893?v=4)](https://github.com/jstewmc "jstewmc (2 commits)")

---

Tags

phpfilevalidatesizejstewmc

### Embed Badge

![Health badge](/badges/jstewmc-validate-file-size/health.svg)

```
[![Health](https://phpackages.com/badges/jstewmc-validate-file-size/health.svg)](https://phpackages.com/packages/jstewmc-validate-file-size)
```

###  Alternatives

[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M19](/packages/blueimp-jquery-file-upload)[davaxi/vcalendar

PHP Class to generate VCalendar (ics) file

1182.9k](/packages/davaxi-vcalendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
