PHPackages                             kshabazz/whip-lash - 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. kshabazz/whip-lash

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

kshabazz/whip-lash
==================

Whip web tools for validation.

0.0.2(7y ago)050[1 PRs](https://github.com/b01/lash/pulls)1MITPHPPHP &gt;=7.0

Since Dec 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/b01/lash)[ Packagist](https://packagist.org/packages/kshabazz/whip-lash)[ RSS](/packages/kshabazz-whip-lash/feed)WikiDiscussions master Synced 2w ago

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

Summary
-------

[](#summary)

Perform assertions on some input via a fluid interface. Allows you to quickly get started with some out-of-the-box general validation. Its also extend-able so that you can customize when needed and encourages re-usability. The fluid interface can also help to reduce testing efforts.

Description
-----------

[](#description)

A validation library with a fluid interface. Some features to note are that:

- You can quickly get started with out-of-the-box general validation.
- It can be extended by following a few steps.
- It encourage reuseability
- It can help reduce testing efforts.

How to use Out-of-the-box Validation
------------------------------------

[](#how-to-use-out-of-the-box-validation)

```
$validation = (new Validation())
    ->withMessages([ // These keys DO NOT have to match input keys.
       'fname' => 'name must be between 1-26 chars.',
       'fname_re' => 'can only contain spaces & letters.'
   ])
    ->withInput[
       'fnname' => 'First',
   ]);

$validation->assert('first_name')
    ->length(1, 26, 'fname')
    ->regExp('/^[a-zA-Z]+$/', 'fname_re);

$errors = $validation->getErrors();
```

How to build your Own Validation
--------------------------------

[](#how-to-build-your-own-validation)

So you want to scale the validation down/up to suit your needs and customize it to your application. Then you will need to extend the abstract the \\Whip\\Lash\\Validator class and use some traits. You can either use the \\Whip\\Lash\\Validators supplied with Lash, or \[build your own\](#How to Build your Own Validator).

```
use \Whip\Lash\Validators\Strings;

class FormValidation extents Validator
{
    use Strings;
}
```

How to Build your Own Validator
-------------------------------

[](#how-to-build-your-own-validator)

Validators are just traits with functions. It was decided to use traits over classes and interfaces because the play nice with auto-completion and produce less spaghetti code.

```
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Every ~253 days

Total

3

Last Release

2626d ago

Major Versions

0.0.2 → 1.0.0.x-dev2019-04-22

PHP version history (2 changes)0.0.1PHP &gt;=7.0

1.0.0.x-devPHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/925d9277d50ed15142f489c340899e4405834eb561fabd90dae5c9305df34259?d=identicon)[b01](/maintainers/b01)

---

Top Contributors

[![b01](https://avatars.githubusercontent.com/u/619281?v=4)](https://github.com/b01 "b01 (17 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/kshabazz-whip-lash/health.svg)

```
[![Health](https://phpackages.com/badges/kshabazz-whip-lash/health.svg)](https://phpackages.com/packages/kshabazz-whip-lash)
```

###  Alternatives

[chaoswey/taiwan-id-validator

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

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

PHPackages © 2026

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