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 today

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 32% 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

2577d 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

[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)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[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)

PHPackages © 2026

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