protected function postValidate($valid, Params $params, $options = array())
    {
        if ($valid) {
            foreach ($this->getEntities() as $tag => $entity) {
                $this->em()->persist($entity);
            }
            if (!isset($options[static::OPTION_NO_FLUSH]) || !$options[static::OPTION_NO_FLUSH]) {
                $this->em()->flush();
            }
        }
    }