This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

Symfony RespectValidationBundle

Installs: 43

Dependents: 0

Suggesters: 0

Security: 0

Stars: 18

Watchers: 11

Forks: 4

Open Issues: 2


dev-master 2015-06-10 21:01 UTC

This package is auto-updated.

Last update: 2021-11-23 21:46:13 UTC


Build Status Latest Stable Version Total Downloads Latest Unstable Version License

A Respect\Validation Bundle for Symfony


Package is available on Packagist, you can install it using Composer.

composer require respect/validation-bundle

Add the bundle to your AppKernel.php:

public function registerBundles()
    return array(
        // ...
        new Respect\ValidationBundle\RespectValidationBundle(),
        // ...


Use as service respect.validator

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

Use as alias


use Respect\Validation\Validator as v;

class AcmeController extends Controller
    public function indexAction()
        $validUsername = v::alnum()

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