PHPackages                             ap-lib/error-node - 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. ap-lib/error-node

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

ap-lib/error-node
=================

A simple and lightweight PHP library for handling structured error messages, useful for validation, data processing, and API responses

046PHP

Since Aug 18Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/ap-lib/error-node)[ Packagist](https://packagist.org/packages/ap-lib/error-node)[ RSS](/packages/ap-lib-error-node/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

AP\\ErrorNode
=============

[](#aperrornode)

[![MIT License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A simple and lightweight PHP library for handling structured error messages, useful for validation, data processing, and API responses.

Installation
------------

[](#installation)

```
composer require ap-lib/error-node
```

Features
--------

[](#features)

- Structured error representation
- Easy instantiation of single or multiple errors
- Throwable error handling
- Simple and extensible design

Requirements
------------

[](#requirements)

- PHP 8.3 or higher

Getting started
---------------

[](#getting-started)

### Basic usage

[](#basic-usage)

```
use AP\ErrorNode\Error;
use AP\ErrorNode\Errors;
use AP\ErrorNode\ThrowableErrors;

// Creating a single error
$error = new Error("Invalid input", ["user", "email"]);

// Creating multiple errors
$errors = new Errors([
    new Error("Field is required", ["user", "name"]),
    new Error("Invalid format", ["user", "email"]),
]);

// Handling errors
if (!empty($errors->getErrors())) {
    throw $errors->getNodeErrorsThrowable();
}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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/44118261?v=4)[Panton](/maintainers/AntonPanfilov)[@AntonPanfilov](https://github.com/AntonPanfilov)

---

Top Contributors

[![anton-panfilov](https://avatars.githubusercontent.com/u/1083546?v=4)](https://github.com/anton-panfilov "anton-panfilov (9 commits)")

### Embed Badge

![Health badge](/badges/ap-lib-error-node/health.svg)

```
[![Health](https://phpackages.com/badges/ap-lib-error-node/health.svg)](https://phpackages.com/packages/ap-lib-error-node)
```

###  Alternatives

[chaoswey/taiwan-id-validator

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

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

PHPackages © 2026

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