PHPackages                             m6w6/ascertain - 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. m6w6/ascertain

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

m6w6/ascertain
==============

Simple validator, not doing much harm

08PHP

Since Oct 22Pushed 12y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ascertain
=========

[](#ascertain)

[![Build Status](https://camo.githubusercontent.com/bc9c9e9f53f38afb3df061ae4fc32b3f320b40338091d5732f623a26d98953f8/68747470733a2f2f7472617669732d63692e6f72672f6d696b652d7068702d6e65742f61736365727461696e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mike-php-net/ascertain)

Harmless validation.

```
$user->assert()
	->that("name")
		->isNotNothing("a name is required")
		->isLen(4, "must be at least 4 characters long")
	->that("email")
		->isEmail("is not valid")
	->that("homepage")
		->when($user->hasHomepage())
		->isUrl("seems not to be a valid URL");

# ...

class User implements \ascertain\Testable
{
	use \ascertain\Validator;

	protected $id;
	protected $name;
	protected $email;
	protected $homepage;

	function hasHomepage() {
		return isset($this->homepage);
	}

	function export() {
		return array(
			"name"     => $this->name,
			"email"    => $this->email,
			"homepage" => $this->homepage.
		);
	}
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1265282?v=4)[Michael Wallner](/maintainers/m6w6)[@m6w6](https://github.com/m6w6)

---

Top Contributors

[![m6w6](https://avatars.githubusercontent.com/u/1265282?v=4)](https://github.com/m6w6 "m6w6 (13 commits)")

### Embed Badge

![Health badge](/badges/m6w6-ascertain/health.svg)

```
[![Health](https://phpackages.com/badges/m6w6-ascertain/health.svg)](https://phpackages.com/packages/m6w6-ascertain)
```

###  Alternatives

[chaoswey/taiwan-id-validator

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

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

PHPackages © 2026

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