PHPackages                             datahihi1/tiny-env-validator - 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. datahihi1/tiny-env-validator

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

datahihi1/tiny-env-validator
============================

Validation helpers for tiny-env: rules and helpers to validate .env values

1.0.0(7mo ago)00MITPHPPHP &gt;=7.1

Since Oct 5Pushed 7mo agoCompare

[ Source](https://github.com/datahihi1/tiny-env-validator)[ Packagist](https://packagist.org/packages/datahihi1/tiny-env-validator)[ RSS](/packages/datahihi1-tiny-env-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

tiny-env-validator
==================

[](#tiny-env-validator)

Validation helpers for [tiny-env](https://github.com/datahihi1/tiny-env.git) — simple rules and helpers to validate .env values.

Installation
------------

[](#installation)

```
composer require datahihi1/tiny-env-validator:^1.0
```

Usage (example)
---------------

[](#usage-example)

Assuming tiny-env is loaded:

```
require 'vendor/autoload.php';

// procedural helper
validate_env([
  'APP_ENV'   => 'required|string',
  'DB_PORT'   => 'required|int',
  'APP_DEBUG' => 'bool'
]);

// or using a Validator class (if available)
// $validator = new Datahihi1\TinyEnv\Validator([...rules...]);
// $validator->validate();
```

Features
--------

[](#features)

- Common validation rules: required, string, int, float, bool, email, in, regex...
- Simple helper wrappers for quick checks
- Designed to integrate with [tiny-env](https://github.com/datahihi1/tiny-env.git)

Examples
--------

[](#examples)

```
validate_env([
  'VERSION' => 'required|string',
  'DB_PORT' => 'int',
  'APP_DEBUG' => 'bool'
]);
```

Contributing
------------

[](#contributing)

PRs welcome. Follow coding style and include tests for new rules.

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance63

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

225d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d4e04716bebfe938a06dfd6da1d7c0c51927d8549a2dbcdbd72d23a8c8c5f79?d=identicon)[datahihi1](/maintainers/datahihi1)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/datahihi1-tiny-env-validator/health.svg)

```
[![Health](https://phpackages.com/badges/datahihi1-tiny-env-validator/health.svg)](https://phpackages.com/packages/datahihi1-tiny-env-validator)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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