PHP code example of majkl578 / nette-symfony-validator
1. Go to this page and download the library: Download majkl578/nette-symfony-validator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
majkl578 / nette-symfony-validator example snippets
Majkl578\NetteSymfonyValidator\Config\Extension::register($configurator);
Majkl578\NetteSymfonyValidator\Config\ORMExtension::register($configurator);
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;
// ...
}