PHPackages                             zero-to-prod/validate-semver - 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. zero-to-prod/validate-semver

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

zero-to-prod/validate-semver
============================

Validates a SemVer String

v71.1.0(8mo ago)19141MITDockerfilePHP &gt;=7.1CI passing

Since Nov 9Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/validate-semver)[ Packagist](https://packagist.org/packages/zero-to-prod/validate-semver)[ Docs](https://github.com/zero-to-prod/validate-semver)[ Fund](https://github.com/sponsors/zero-to-prod)[ RSS](/packages/zero-to-prod-validate-semver/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (1)

Zerotoprod\\ValidateSemVer
==========================

[](#zerotoprodvalidatesemver)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/validate-semver)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/fa8b13273880c86480aca6937a6eb7db39ac4ab84d48cede872823ba76842b65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665722f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/validate-semver/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/665785a8bf850472192c71971d4b2d5bc6dd22f63026c076835b5fbb9ff36c65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665722f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/validate-semver/actions)[![Packagist Downloads](https://camo.githubusercontent.com/216bac61cb2c568726548ac2e969e46468cf7ae9c4ce39f002d1d08384408367/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665723f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/validate-semver/stats)[![php](https://camo.githubusercontent.com/8bb8e2df26eb22710b2230e81de292163351077ba7bdcd9f8f36959dadcb5edc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665722e7376673f636f6c6f723d707572706c65)](https://packagist.org/packages/zero-to-prod/validate-semver/stats)[![Packagist Version](https://camo.githubusercontent.com/e29a27c123fce34d1cf20decac885ac081c31934c3141febfc86d3a3f76bff68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665723f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/validate-semver)[![License](https://camo.githubusercontent.com/a504e594974de72922a20214cc24a96e3909e68598bc2b9818a5b33fba9cf45c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665723f636f6c6f723d70696e6b)](https://github.com/zero-to-prod/validate-semver/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/dc2230adbd6e714bad26c44e5406f792774d33e1dbdd7e8d9f62a396a9f13bde/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665722e737667)](https://wakatime.com/badge/github/zero-to-prod/validate-semver)[![Hits-of-Code](https://camo.githubusercontent.com/a06e17f6ffafc5b55ea68b404fb18037efe8c055c8c0d310486d507baa3b19d3/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f76616c69646174652d73656d7665723f6272616e63683d6d61696e)](https://hitsofcode.com/github/zero-to-prod/validate-semver/view?branch=main)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Usage](#usage)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

Validates a SemVer string.

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

[](#requirements)

- PHP 7.1 or higher.

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

[](#installation)

Install `Zerotoprod\ValidateSemver` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/validate-semver
```

This will add the package to your project’s dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/validate-semver)
vendor/bin/zero-to-prod-validate-semver

# Publish to custom directory
vendor/bin/zero-to-prod-validate-semver /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
  "scripts": {
    "post-install-cmd": [
      "zero-to-prod-validate-semver"
    ],
    "post-update-cmd": [
      "zero-to-prod-validate-semver"
    ]
  }
}
```

Usage
-----

[](#usage)

Returns true if the value is a valid SemVer string.

```
Zerotoprod\ValidateSemVer\ValidateSemVer::isValid('1.0.0')
```

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/validate-semver/issues) page if you want to contribute.

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance60

Regular maintenance activity

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~59 days

Total

9

Last Release

253d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (18 commits)")

---

Tags

phpsemvervalidationzero-to-prodvalidate semver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-validate-semver/health.svg)

```
[![Health](https://phpackages.com/badges/zero-to-prod-validate-semver/health.svg)](https://phpackages.com/packages/zero-to-prod-validate-semver)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)

PHPackages © 2026

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