Skip to content

Instantly share code, notes, and snippets.

View hakisa-jerome's full-sized avatar

Jérôme Cognard hakisa-jerome

  • Hakisa
  • Strasbourg
View GitHub Profile
@hakisa-jerome
hakisa-jerome / ValidatorListener.php
Created September 23, 2012 08:12
Prevent invalid entities from being updated
<?php
namespace Acme\DemoBundle\EventListener;
use Symfony\Component\Validator\Validator;
use Doctrine\ORM\Event\LifecycleEventArgs;
/**
* Prevent invalid entities from being updated
*