PHPackages                             majkl578/nette-symfony-validator - 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. majkl578/nette-symfony-validator

AbandonedArchivedNette-addon[Validation &amp; Sanitization](/categories/validation)

majkl578/nette-symfony-validator
================================

Integration of Symfony Validator component into Nette 2.

1.1.0(13y ago)6551MITPHPPHP &gt;=5.3.3

Since Apr 11Pushed 13y ago1 watchersCompare

[ Source](https://github.com/Majkl578/nette-symfony-validator)[ Packagist](https://packagist.org/packages/majkl578/nette-symfony-validator)[ RSS](/packages/majkl578-nette-symfony-validator/feed)WikiDiscussions master Synced 2w ago

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

Symfony Validator component &amp; Nette 2
=========================================

[](#symfony-validator-component--nette-2)

Nette addon for integrating Symfony Validator component into Nette 2.

Requirements
------------

[](#requirements)

- PHP 5.3.3 or newer
- Symfony Validator 2.2
- Doctrine Common 2.3
- Nette 2.0
- Doctrine ORM 2.3 (optional)

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

[](#installation)

- Add "`majkl578/nette-symfony-validator`" to your dependencies in composer.json. Don't forget to run `composer update`.
- Register extension to start using this addon. Add the following call just before the call `$configurator->createContainer()`:

```
Majkl578\NetteSymfonyValidator\Config\Extension::register($configurator);
```

- If you want to use integration with Doctrine ORM, register also ORM extension:

```
Majkl578\NetteSymfonyValidator\Config\ORMExtension::register($configurator);
```

- Delete cache.

You're done. ;)

General usage
-------------

[](#general-usage)

Just use as normal service, e.g. autowire Symfony\\Component\\Validator\\Validator. For more general usage, see [Symfony 2 Validation documentation](http://symfony.com/doc/2.2/book/validation.html).

Doctrine 2 ORM
--------------

[](#doctrine-2-orm)

Validation is performed automatically only on new or changed entities. The validation is registered automatically through event listener. It is listening for preFlush event so the validation itself is performed after calling EntityManager::flush(), just before committing changes to database.

For more information about adding constraints to fields, see [Properties in Symfony 2 Validation documentation](http://symfony.com/doc/current/book/validation.html#properties). Here's just a simple example:

```
namespace Example;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

class User
{
	/**
	 * @ORM\Column
	 * @Assert\NotBlank
	 */
	private $name;

	/**
	 * @ORM\Column
	 * @Assert\NotBlank
	 * @Assert\Email
	 */
	private $email;

	// ...
}
```

Issues
------

[](#issues)

In case of any problems, just leave an issue here on GitHub (or, better, send a pull request).

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

2

Last Release

4872d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56faa1d197f67a98564f3bfb84d39aeeaaa7e1c979c804378b07aad783b13100?d=identicon)[Majkl578](/maintainers/Majkl578)

---

Top Contributors

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

---

Tags

symfonyvalidatornetteaddon

### Embed Badge

![Health badge](/badges/majkl578-nette-symfony-validator/health.svg)

```
[![Health](https://phpackages.com/badges/majkl578-nette-symfony-validator/health.svg)](https://phpackages.com/packages/majkl578-nette-symfony-validator)
```

###  Alternatives

[sylius/sylius

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

8.5k6.0M776](/packages/sylius-sylius)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k52.2M371](/packages/api-platform-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[api-platform/validator

API Platform validator component

275.1M31](/packages/api-platform-validator)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.5M](/packages/barbieswimcrew-zip-code-validator)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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