PHPackages                             youniverse-center/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. youniverse-center/request-validation-bundle

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

youniverse-center/request-validation-bundle
===========================================

Symfony Bundle for automatic validation of data provided in the request.

0.2.1(4y ago)031MITPHPPHP ^8.0

Since Jun 18Pushed 4y ago2 watchersCompare

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

READMEChangelogDependencies (5)Versions (4)Used By (0)

request-validation-bundle
=========================

[](#request-validation-bundle)

1. Add validator class implementing `Yc\RequestValidationBundle\RequestValidator\RequestValidatorInterface`

- in the `getConstriant` return constraints used by the validator component
- in the `getGroups` return validation groups
- `getInvalidRequestResponse` must return response that will be used if the validation has failed.

2. Add attribute `Yc\RequestValidationBundle\Attributes\RequestValidator` to your controller

```
#[Route('/some/route', name: 'some_route')]
#[RequestValidator(Create::class)]
class CreateController extends AbstractController
{
  public function __invoke($data)
  {
    // in the data is your validated request content
  }
}
```

(This attribute can be also placed on a method if you have multple controllers in a class.)

3. You probably want to receive data from the request for the validation in your specific way. For this purpose implement `Yc\RequestValidationBundle\DataReceiver\DataReceiverInterface`

for example:

```
public function getData(Request $request): mixed
{
    return json_decode($request->getContent(), true);
}
```

4. By default the data will be set in the request attribute `data` if you want to change this, implement `Yc\RequestValidationBundle\DataTransformer\DataTransformerInterface`

for example:

```
public function transformData(mixed $data): array
{
    $id = ProjectId::fromString($data['id']);

    return [
        'project' => new Project($id, $data['name'])
    ];
}
```

and then you can use it in controller like:

```
public function __invoke(Project $project) {}

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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 ~1 days

Total

3

Last Release

1788d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10545815?v=4)[Grzegorz Balcewicz](/maintainers/gbalcewicz)[@gbalcewicz](https://github.com/gbalcewicz)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/youniverse-center-request-validation-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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