coderxlsn/doctrine_validate_frame

1.0.2 2016-05-05 22:58 UTC

This package is not auto-updated.

Last update: 2024-05-25 17:33:13 UTC


README

Installation

Simplest is to add the following to composer.json:

{
    "require": {
        "coderxlsn/doctrine_validate_frame": "~1.0"
    }
}

And then run:

php composer.phar install

Alternately, use git to install this as a submodule:

git submodule add git://github.com/coderxlsn/CoderxlsnValidate vendor/coderxlsn

Usage

Entity

Add to validate model

namespace My;

namespace My\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\EntityListeners({ "CoderxlsnValidate\Doctrine\Listener\IframeValidate"})
 * @ORM\Table(name="events")
 */
class Model
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer",unique=true);
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="name", type="string", length=255, nullable=false))
     */
    protected $name;

If the upgrade falls text frame , an error is sent to the email admin