PHPackages                             respect/validation-bundle - 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. respect/validation-bundle

ActiveSymfony-bundle[Validation &amp; Sanitization](/categories/validation)

respect/validation-bundle
=========================

Symfony RespectValidationBundle

17463[2 issues](https://github.com/Respect/ValidationBundle/issues)PHP

Since Jun 10Pushed 10y ago8 watchersCompare

[ Source](https://github.com/Respect/ValidationBundle)[ Packagist](https://packagist.org/packages/respect/validation-bundle)[ RSS](/packages/respect-validation-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ValidationBundle
================

[](#validationbundle)

[![Build Status](https://camo.githubusercontent.com/97da5647318975a2ab71a79f3dcbd1f495851e6ea7d3f334b3bf83f7f96cd5ce/68747470733a2f2f7472617669732d63692e6f72672f526573706563742f56616c69646174696f6e42756e646c652e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/Respect/ValidationBundle?branch=develop)[![Latest Stable Version](https://camo.githubusercontent.com/dc5e8b6616e4aec9d7c0c279e6d6fae667d5715cb723a1811619ccc75862ed43/68747470733a2f2f706f7365722e707567782e6f72672f726573706563742f76616c69646174696f6e2d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/respect/validation-bundle)[![Total Downloads](https://camo.githubusercontent.com/6a94d58086baf278376bfa6b203562b3ee31b41212e7789ad3faab874881f8d7/68747470733a2f2f706f7365722e707567782e6f72672f726573706563742f76616c69646174696f6e2d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/respect/validation-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/b02145d009d122096b7503fea8b22da739883821f1ab7fe6e5263a7237c6162e/68747470733a2f2f706f7365722e707567782e6f72672f726573706563742f76616c69646174696f6e2d62756e646c652f762f756e737461626c652e706e67)](https://packagist.org/packages/respect/validation-bundle)[![License](https://camo.githubusercontent.com/73b8d2e466bef9072f33a991949f42d146257ba8e75e93dbee3698454ceac731/68747470733a2f2f706f7365722e707567782e6f72672f726573706563742f76616c69646174696f6e2d62756e646c652f6c6963656e73652e706e67)](https://packagist.org/packages/respect/validation-bundle)

A Respect\\Validation Bundle for Symfony

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

[](#installation)

Package is available on [Packagist](http://packagist.org/packages/respect/validation-bundle), you can install it using [Composer](http://getcomposer.org).

```
composer require respect/validation-bundle
```

Add the bundle to your AppKernel.php:

```
public function registerBundles()
{
    return array(
        // ...
        new Respect\ValidationBundle\RespectValidationBundle(),
        // ...
    );
}
```

Usage
-----

[](#usage)

### Use as service `respect.validator`

[](#use-as-service-respectvalidator)

```
//...
class AcmeController extends Controller
{
    public function indexAction()
    {
        $number = 123;
        $isValid = $this->get('respect.validator')->numeric()->validate($number);//true
//...
```

### Use as alias

[](#use-as-alias)

```
//...

use Respect\Validation\Validator as v;

class AcmeController extends Controller
{
    public function indexAction()
    {
        $validUsername = v::alnum()
            ->noWhitespace()
            ->length(1,15);

        $isValid = $validUsername->validate('alganet'); //true
        //...
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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/202642?v=4)[Alexandre Gomes Gaigalas](/maintainers/alganet)[@alganet](https://github.com/alganet)

![](https://avatars.githubusercontent.com/u/154023?v=4)[Henrique Moody](/maintainers/henriquemoody)[@henriquemoody](https://github.com/henriquemoody)

![](https://www.gravatar.com/avatar/aef3ebfba857504b29c8c54d3df12397cec9cc4b1a0890a799a7dc8d9c8c01ad?d=identicon)[Respect](/maintainers/Respect)

---

Top Contributors

[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (9 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (2 commits)")[![alganet](https://avatars.githubusercontent.com/u/202642?v=4)](https://github.com/alganet "alganet (1 commits)")[![filhodanuvem](https://avatars.githubusercontent.com/u/94096?v=4)](https://github.com/filhodanuvem "filhodanuvem (1 commits)")[![gabrieljmj](https://avatars.githubusercontent.com/u/2223216?v=4)](https://github.com/gabrieljmj "gabrieljmj (1 commits)")[![nickl-](https://avatars.githubusercontent.com/u/1404606?v=4)](https://github.com/nickl- "nickl- (1 commits)")

### Embed Badge

![Health badge](/badges/respect-validation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/respect-validation-bundle/health.svg)](https://phpackages.com/packages/respect-validation-bundle)
```

###  Alternatives

[webmozart/assert

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

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[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)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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