Download the PHP package choz/request-validation-bundle without Composer
On this page you can find all versions of the php package choz/request-validation-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download choz/request-validation-bundle
More information about choz/request-validation-bundle
Files in choz/request-validation-bundle
Package request-validation-bundle
Short Description a bundle that's inspired in Laravel request validation
License MIT
Homepage https://github.com/ferchoz/request-validation-bundle
Informations about the package request-validation-bundle
API 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
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
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:
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:
Basic Usage
Request:
Controller:
Response with errors from an empty request (code 400):
Optional
To use it correctly with json request is recommended to install: Symfony JsonRequest Bundle
JSON Request:
Will get a JSON Response:
Advanced (recommended) usage:
Request:
Controller:
Custom response code:
Override response code:
Custom event listener:
Override event listener:
All versions of request-validation-bundle with dependencies
symfony/framework-bundle Version ^4.3 || ^5.0 || ^6.0
symfony/validator Version ^4.3 || ^5.0 || ^6.0
symfony/property-access Version ^4.3 || ^5.0 || ^6.0
adbario/php-dot-notation Version ^3.0