PHPackages                             thomasdcodes/isbn-library - 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. thomasdcodes/isbn-library

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

thomasdcodes/isbn-library
=========================

The library provides a check if a ISBN-13 is valid or not. It also calculates a ISBN-13 check number with a given isbn root.

1.0.0(6y ago)018[1 PRs](https://github.com/thomasdcodes/isbn_library/pulls)MITPHPPHP &gt;=7.2.0CI failing

Since May 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/thomasdcodes/isbn_library)[ Packagist](https://packagist.org/packages/thomasdcodes/isbn-library)[ RSS](/packages/thomasdcodes-isbn-library/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

IsbnLibrary
===========

[](#isbnlibrary)

The library provides a check if a ISBN-13 is valid or not. It also calculates a ISBN-13 check number with a given isbn root.

Install
-------

[](#install)

`composer require thomasdcodes/isbn-library`

Use
---

[](#use)

The Class `IsbnLibrary` only allows static usage.

Use `IsbnLibrary::sanitizeIsbn('978-3-123-45678-9')` to remove all hyphens.

Use `IsbnLibrary::isIsbn13Valid('978-3-123-45678-9')` to check a ISBN is valid or not.

Use `IsbnLibrary::calculateIsbn13CheckNumber('978-3-123-45678')` to calculate the check number for a given ISBN-13 root.

Both functions (`IsbnLibrary::isIsbn13Valid()` and `IsbnLibrary::calculateIsbn13CheckNumber()`) are calling the `IsbnLibrary::sanitizeIsbn()` function before any other calculations. So you can give a ISBN-13 with hyphens.

Tests
-----

[](#tests)

All ISBN-13 numbers insight the tests were make by fantasy. If there is any valid ISBN-13 write me an email and I will change it to another ISBN-13.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance53

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2208d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50184aa55e9690a3500141891d8898db05b581614b44349c17ccad5593cea3c2?d=identicon)[thomasdcodes](/maintainers/thomasdcodes)

---

Top Contributors

[![thomasdcodes](https://avatars.githubusercontent.com/u/60360377?v=4)](https://github.com/thomasdcodes "thomasdcodes (1 commits)")

---

Tags

ISBNISBN-13isbn check

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thomasdcodes-isbn-library/health.svg)

```
[![Health](https://phpackages.com/badges/thomasdcodes-isbn-library/health.svg)](https://phpackages.com/packages/thomasdcodes-isbn-library)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8013.3M23](/packages/ronanguilloux-isocodes)[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)[biblys/isbn

A PHP library to convert and validate ISBNs

56346.8k1](/packages/biblys-isbn)

PHPackages © 2026

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