PHPackages                             jnbruno/forrest - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jnbruno/forrest

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jnbruno/forrest
===============

validator and database middleware for PHP

0.0005(10y ago)02031PHP

Since Apr 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Jay-En/forrest)[ Packagist](https://packagist.org/packages/jnbruno/forrest)[ RSS](/packages/jnbruno-forrest/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (14)Used By (1)

forrest
=======

[](#forrest)

> validator and database middleware for PHP

Get Started
-----------

[](#get-started)

### Install via composer

[](#install-via-composer)

Add forrest to composer.json configuration file.

```
$ composer require jnbruno/forrest

```

And update the composer

```
$ composer update

```

```
// Initialize with composer autoload
require 'vendor/autoload.php';

// Initialize
$forrest = new forrest([
    'database_type' => 'mysql',
    'database_name' => 'name',
    'server' => 'localhost',
    'username' => 'your_username',
    'password' => 'your_password',
    'charset' => 'utf8'
]);
```

SELECT
------

[](#select)

```
//select($table,$join,$where)
$test->select('test',[
			'number as this_is_number',
			'text',
			'email'
			],
			[
			"LIMIT"	=> 5,
			"ORDER" => "number ASC"
]);

```

INSERT
------

[](#insert)

```
//table($tablename)
$result = $test ->table('test')
//add rules condition
				->rules([
							'number' 	 => "required|numeric",
							'text'		 => "required|min_len,6",
							'email'		 => "required|valid_email"
						])

//validate then insert if valid
				->insert([
							'number' 	 => "1",
							'text'		 => "Forrest Test Text",
							'email'		 => "me@jnbruno.com"
						]);
```

UPDATE
------

[](#update)

```
$result = $test ->table('test')
				->rules([
							'number' 			=> "required|numeric",
							'text'		   		=> ["required|min_len,6", "trim"],
							'email'		   		=> "required|valid_email"
						])

			//	->update($items, $where)
				->update([
								'number' 	   => "1",
								'text'		   => "                 Forrest Test Update                 ",
								'email'		   => "me@jnbruno.com"
						], ['test_id' => 1]);
```

License
-------

[](#license)

Forrest is under the MIT license.

DEPENDENCIES
------------

[](#dependencies)

- Medoo :
- Gump :

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~5 days

Total

13

Last Release

3651d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2737523?v=4)[jnbruno](/maintainers/jnbruno)[@jnbruno](https://github.com/jnbruno)

---

Top Contributors

[![Jay-En](https://avatars.githubusercontent.com/u/7314577?v=4)](https://github.com/Jay-En "Jay-En (26 commits)")

### Embed Badge

![Health badge](/badges/jnbruno-forrest/health.svg)

```
[![Health](https://phpackages.com/badges/jnbruno-forrest/health.svg)](https://phpackages.com/packages/jnbruno-forrest)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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