PHPackages                             openlss/lib-validate - 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. [Templating &amp; Views](/categories/templating)
4. /
5. openlss/lib-validate

ActiveLibrary[Templating &amp; Views](/categories/templating)

openlss/lib-validate
====================

Validation helper with a shorthand syntax.

0.0.6(13y ago)01391LGPL-3.0+PHPPHP &gt;=5.3.2

Since Mar 24Pushed 13y ago1 watchersCompare

[ Source](https://github.com/nullivex/lib-validate)[ Packagist](https://packagist.org/packages/openlss/lib-validate)[ Docs](http://openlss.org)[ RSS](/packages/openlss-lib-validate/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (8)Used By (1)

openlss/lib-validate
====================

[](#openlsslib-validate)

Validation helper with a shorthand syntax.

Usage
-----

[](#usage)

```
use \LSS\Validate;

$data = array('myparam'=>'valid string');

try {
	Validate::prime($data);
	Validate::go('myparam')->not('blank')->max(20)->is('alnum');
	Validate::paint();
} catch(Exception $e){
	echo $e;
}
```

Types
-----

[](#types)

All these types will evaluate to true IF:

- blank '' === true
- empty empty() === true
- null is\_null($var)
- ip var is IPv4 octect format
- mac True if var is in mac address format (loose check for chars)
- domain True if var is a domain name (loose check for chars)
- num True if var is all numeric
- dec True if the var is numeric with a decimal point
- float Same as dec
- alpha True if all characters are alpha-numeric
- al Same as alpha
- alu Same as alpha but with underscores (\_)
- als True if var is alphanumeric with spaces
- alnums Alias to als
- en Alias to als
- email True if chars are valid for an email address
- sha1 True if var is a sha1 hash
- md5 True of var is a md5 hash

Reference
---------

[](#reference)

### (void) Validate::prime($data)

[](#void-validateprimedata)

Prep validate with an array of data usualy from post()

### (object) Validate::go($var)

[](#object-validategovar)

Starts a validation object for the given param

### (object) Validate::\_get()

[](#object-validate_get)

Returns the current instance

### (object) Validate::error($err)

[](#object-validateerrorerr)

Add error message to buffer This is generally used internally

### (object) Validate::setVar($var)

[](#object-validatesetvarvar)

Sets the var to operate on This is generally used internally

### (string) Validate::get()

[](#string-validateget)

Retrieves the current variable This is generally used internally

### (object) Validate::min($min)

[](#object-validateminmin)

Checks that the current var is at minimum $min long

### (object) Validate::max($max)

[](#object-validatemaxmax)

Checks that the current var is at maximum $max long

### (object) Validate::not($type)

[](#object-validatenottype)

Checks that the current var is not given $type

### (object) Validate::is($type)

[](#object-validateistype)

Checks that the current var is given #type

### (bool) Validate::paint()

[](#bool-validatepaint)

If there are any errors in the buffer an exception will be raised Otherwise TRUE is returned

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~0 days

Total

6

Last Release

4844d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83c8e9d55e3ebafb0621a441a51af8f551f61a274fde5400459a29cc320b7b75?d=identicon)[nullivex](/maintainers/nullivex)

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

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (9 commits)")[![Spudz76](https://avatars.githubusercontent.com/u/2391234?v=4)](https://github.com/Spudz76 "Spudz76 (1 commits)")

---

Tags

templatingphptalTAL

### Embed Badge

![Health badge](/badges/openlss-lib-validate/health.svg)

```
[![Health](https://phpackages.com/badges/openlss-lib-validate/health.svg)](https://phpackages.com/packages/openlss-lib-validate)
```

###  Alternatives

[twig/twig

Twig, the flexible, fast, and secure template language for PHP

8.4k457.8M6.8k](/packages/twig-twig)[mustache/mustache

A Mustache implementation in PHP.

3.3k46.6M313](/packages/mustache-mustache)[smarty/smarty

Smarty - the compiling PHP template engine

2.4k40.9M448](/packages/smarty-smarty)[timber/timber

Create WordPress themes with beautiful OOP code and the Twig Template Engine

5.7k3.6M127](/packages/timber-timber)[league/plates

Plates, the native PHP template system that's fast, easy to use and easy to extend.

1.5k6.1M262](/packages/league-plates)[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8259.3M103](/packages/eftec-bladeone)

PHPackages © 2026

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