PHPackages                             emanueleminotto/naughty-validator - 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. emanueleminotto/naughty-validator

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

emanueleminotto/naughty-validator
=================================

Symfony validator for naughty strings

1.0.1(9y ago)0208MITPHPPHP ^5.6 || ^7.0

Since Dec 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/EmanueleMinotto/naughty-validator)[ Packagist](https://packagist.org/packages/emanueleminotto/naughty-validator)[ Docs](https://github.com/EmanueleMinotto/naughty-validator)[ RSS](/packages/emanueleminotto-naughty-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Naughty Strings Validator
=========================

[](#naughty-strings-validator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94e3b2b9d6cb77fe6cb4a51023b054847d875b74ad28fcc5806aa866dacd8fdc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d616e75656c656d696e6f74746f2f6e6175676874792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emanueleminotto/naughty-validator)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c9f2e9c732ebd0e18e36b0e9b2f3d49487a494ca14c6257515ef9845177e62d4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f456d616e75656c654d696e6f74746f2f6e6175676874792d76616c696461746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/EmanueleMinotto/naughty-validator)[![Coverage Status](https://camo.githubusercontent.com/dc482cef5e0f3a88d7d68d21443841a9fffada04384771f48b0bc345ac80f44a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f656d616e75656c656d696e6f74746f2f6e6175676874792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/emanueleminotto/naughty-validator/code-structure)[![Quality Score](https://camo.githubusercontent.com/ca61b3ad5411ed908a726b142e4246c05370068dfea40ff639964d5b6ed83eb4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f656d616e75656c656d696e6f74746f2f6e6175676874792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/emanueleminotto/naughty-validator)[![Total Downloads](https://camo.githubusercontent.com/805a5a0e72945ed66a470350b943c1c423285deb92bb272f929a5b15606452a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d616e75656c656d696e6f74746f2f6e6175676874792d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emanueleminotto/naughty-validator)

Symfony validator for unsafe strings, based on [minimaxir/big-list-of-naughty-strings](https://github.com/minimaxir/big-list-of-naughty-strings).

Install
-------

[](#install)

Via Composer

```
$ composer require emanueleminotto/naughty-validator
```

Usage
-----

[](#usage)

```
use EmanueleMinotto\NaughtyValidator\NotNaughty;

$constraint = new NotNaughty();
$constraint->message = 'This value is not safe.';

// use the validator to validate the value
$errorList = $this
    ->get('validator')
    ->validate('?:"{}|_+', $constraint);

$errorMessage = $errorList[0]->getMessage();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Emanuele Minotto](https://github.com/EmanueleMinotto)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

2

Last Release

3424d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b6fbd038f22a54716027eb7ce30c6cafd8e59c138ae58b3c2516c34ccfef7f?d=identicon)[EmanueleMinotto](/maintainers/EmanueleMinotto)

---

Top Contributors

[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (9 commits)")

---

Tags

symfonyvalidatornaughty strings

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/emanueleminotto-naughty-validator/health.svg)

```
[![Health](https://phpackages.com/badges/emanueleminotto-naughty-validator/health.svg)](https://phpackages.com/packages/emanueleminotto-naughty-validator)
```

###  Alternatives

[rollerworks/password-strength-validator

Password-strength validator for Symfony

1455.7M5](/packages/rollerworks-password-strength-validator)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.3M](/packages/barbieswimcrew-zip-code-validator)[sllh/iso-codes-validator

Symfony validator wrapper of ronanguilloux/isocodes

37299.8k2](/packages/sllh-iso-codes-validator)

PHPackages © 2026

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