PHPackages                             vbpupil/input-validation - 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. vbpupil/input-validation

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

vbpupil/input-validation
========================

Very simple Form Input Validation for when you want to use your own existing forms.

3.1.1(8y ago)01.0k1GPL-3.0-or-laterPHPPHP &gt;=5.6

Since Feb 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vbpupil/InputValidation)[ Packagist](https://packagist.org/packages/vbpupil/input-validation)[ RSS](/packages/vbpupil-input-validation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (0)

InputValidation
===============

[](#inputvalidation)

Simple form input validation. To be used when you need a quick on the fly no nonsense validation.

This simple class is not meant to replace some of he more advanced validation scripts, its simply a substitute for when you have pre existing forms that are not part of any form solution and just need to validate simply and quickly. Validation now includes CSRF which is handled via $\_SESSION.

Install
-------

[](#install)

A. In your terminal enter ***composer require vbpupil/input-validation***

B. Once installed you will need to take a copy of the *config* directory and place it to be outside of the *vendor dir*, ie

```
project
│
└───config
│   │
│   └───InputValidation
│               config.yml
│
└───vendor
    │
    └───vbpupil

```

> This directory contains a yaml file that allow you to manage your definitions aswell as err and success return text.

Usage
-----

[](#usage)

Create your form as normal.

1. note that **textarea** has a \* at the end of the name, this means that it is not a required field so will only be validated if text is present.
2. also note that if you require CSRF support then simply add in the call below. The argument sent in **form-1** is the unique id for the form. Also worth noting that session start is required before the call to ensure that the SESSION values persist.

```

     this is some test text'

```

3. include the package.

```
use vbpupil\InputValidation;

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

4. set which inputs you want to check;

```
//indicates what inputs it should be checking
$check = array('telephone','postcode','mobile','textarea');
```

5. implement check upon post.

```
  if(isset($_POST)) {
      $r = InputValidation::validate($_POST, $check);

      var_dump($r);
  }
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~4 days

Total

13

Last Release

2954d ago

Major Versions

1.0 → 2.02018-03-06

2.6.0 → 3.0.02018-03-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/afdce7c1b24b3c017b5381c2708b9dd27b9b694de9b09b49ee500a26d3f46364?d=identicon)[vbpupil](/maintainers/vbpupil)

---

Top Contributors

[![vbpupil](https://avatars.githubusercontent.com/u/2638990?v=4)](https://github.com/vbpupil "vbpupil (4 commits)")[![cameronsharp1](https://avatars.githubusercontent.com/u/76456404?v=4)](https://github.com/cameronsharp1 "cameronsharp1 (1 commits)")

---

Tags

validationregexvalidateforminput

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vbpupil-input-validation/health.svg)

```
[![Health](https://phpackages.com/badges/vbpupil-input-validation/health.svg)](https://phpackages.com/packages/vbpupil-input-validation)
```

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[wixel/gump

A fast, extensible &amp; stand-alone PHP input validation class that allows you to validate any data.

1.2k1.3M30](/packages/wixel-gump)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.3M](/packages/barbieswimcrew-zip-code-validator)[laravel-lang/attributes

Translation of form element names

273.8M11](/packages/laravel-lang-attributes)[awurth/slim-validation

A wrapper around the respect/validation PHP validation library for easier error handling and display

65378.4k9](/packages/awurth-slim-validation)[stroker/form

ZF2 module for extending forms with live clientside validation

4157.1k](/packages/stroker-form)

PHPackages © 2026

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