PHPackages                             regexto/validators - 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. regexto/validators

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

regexto/validators
==================

A curated collection of battle-tested regex patterns with PHP validation.

v1.0.3(1mo ago)00MITPHPPHP &gt;=8.1

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/regex-to/validators-php)[ Packagist](https://packagist.org/packages/regexto/validators)[ RSS](/packages/regexto-validators/feed)WikiDiscussions main Synced 1w ago

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

📦 regexto/validators (PHP)
==========================

[](#-regextovalidators-php)

> Curated, production-ready, and battle-tested regex patterns for PHP, backed by the [regex.to](https://regex.to) pattern registry.

**All patterns are open-source, fully tested, and visualized live on [regex.to](https://regex.to).**

[![npm](https://camo.githubusercontent.com/0c6cb74a3cbed2d7540d13990b5599a4a7f20704879eb1ebd148fd09aa5b5699/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f407265676578746f2f76616c696461746f72733f636f6c6f723d6f72616e6765266c6162656c3d4e504d)](https://www.npmjs.com/package/@regexto/validators)[![pypi](https://camo.githubusercontent.com/0d89e1eab41da69da0ea2eb066278027893c3068489d9f4b684d4e835f2bc6ce/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f7265676578746f2d76616c696461746f72733f636f6c6f723d626c7565266c6162656c3d50795049)](https://pypi.org/project/regexto-validators/)[![crates.io](https://camo.githubusercontent.com/7bd103fe5d382093f5a876c4ae6e8ffa6d4a26e76ea28bb36e5d8ddb5582ee01/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f7265676578746f2d76616c696461746f72733f636f6c6f723d6372696d736f6e266c6162656c3d4372617465732e696f)](https://crates.io/crates/regexto-validators)[![packagist](https://camo.githubusercontent.com/5f354e51dc7a75c728ffcd58219009606c417757677c995e079c450719f59c1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265676578746f2f76616c696461746f72733f636f6c6f723d707572706c65266c6162656c3d5061636b6167697374)](https://packagist.org/packages/regexto/validators)[![pkg.go.dev](https://camo.githubusercontent.com/82044abf9bfc12dcdce31d11d803d8d2ee8c3f562804b7968199c6d20f88d63f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f676f2d7265666572656e63652d3030414444383f6c6f676f3d676f266c6f676f436f6c6f723d7768697465)](https://pkg.go.dev/github.com/regex-to/validators-go)[![Tested & Visualized Live](https://camo.githubusercontent.com/37a5f5f59502766c705f8769f85f5f658fa3f0ba73d438ebeb2a3b68e4209f15/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656765782e746f2d73616e64626f782d626c756576696f6c6574)](https://regex.to)

---

Why `regexto/validators`?
-------------------------

[](#why-regextovalidators)

- 🔍 **Tested and Visualized Live:** Every single pattern in this library can be searched, tested, and visualized interactively at [regex.to](https://regex.to).
- 🚀 **Zero Dependencies:** Pure PHP validation. Lightweight and lightning-fast.
- 📁 **JSON Single Source of Truth:** Patterns are declared declaratively in standard JSON files shared across multiple languages.

---

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

[](#installation)

```
composer require regexto/validators
```

---

Quick Start
-----------

[](#quick-start)

### 1. Basic Validation (PHP)

[](#1-basic-validation-php)

```
