PHPackages                             choz/request-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. [API Development](/categories/api)
4. /
5. choz/request-validation-bundle

ActiveSymfony-bundle[API Development](/categories/api)

choz/request-validation-bundle
==============================

a bundle that's inspired in Laravel request validation

v1.0.7(2y ago)92.7k↓50%MITPHPPHP &gt;=7.4 || ^8.0

Since Oct 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ferchoz/request-validation-bundle)[ Packagist](https://packagist.org/packages/choz/request-validation-bundle)[ Docs](https://github.com/ferchoz/request-validation-bundle)[ RSS](/packages/choz-request-validation-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (9)Used By (0)

API Request Validation Bundle
=============================

[](#api-request-validation-bundle)

[![Quality Gate Status](https://camo.githubusercontent.com/d03bad95e3175607818dd4ffd03a5eda4b19238eecd67fb1a08de77a0b6f93a8/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d66657263686f7a5f726571756573742d76616c69646174696f6e2d62756e646c65266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=ferchoz_request-validation-bundle)[![Coverage](https://camo.githubusercontent.com/f8e707f19e2bf35b8ec423f753f46fecb9f076bb262b1ecc18287290a98df09b/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d66657263686f7a5f726571756573742d76616c69646174696f6e2d62756e646c65266d65747269633d636f766572616765)](https://sonarcloud.io/summary/new_code?id=ferchoz_request-validation-bundle)[![Maintainability Rating](https://camo.githubusercontent.com/152ef09418fbdbeebc4ec0171ffae2980b25d4ac38260272a9539e2980fdaa2c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d66657263686f7a5f726571756573742d76616c69646174696f6e2d62756e646c65266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=ferchoz_request-validation-bundle)

This is a small library that helps you validate incoming requests with the symfony validation component. knowing how to work with the validation component is a must, [Validation doc](https://symfony.com/doc/current/validation/raw_values.html)

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require choz/request-validation-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require choz/request-validation-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Choz\RequestValidationBundle\ChozRequestValidationBundle::class => ['all' => true],
];
```

Basic Usage
-----------

[](#basic-usage)

Request:

```
