emericanec / symfony-unique-entity-validator
Symfony UniqueEntity validator for any class (not only for ORM\Entity)
1.0.2
2020-03-28 20:46 UTC
Requires
- php: ^7.2.5
- doctrine/event-manager: ~1.0
- doctrine/persistence: ^1.3
- symfony/polyfill-ctype: ~1.8
- symfony/polyfill-mbstring: ~1.0
- symfony/service-contracts: ^1.1|^2
This package is auto-updated.
Last update: 2024-10-29 05:53:25 UTC
README
Install:
composer require emericanec/symfony-unique-entity-validator
Usage:
<?php use Emericanec\UniqueEntity; /** * @UniqueEntity( * entityClass="App\Entity\User", * fields={"email"} * ) */ class RegistrationForm { protected string $email; public function getEmail(): string { return $this->email; } public function setEmail(string $email): void { $this->email = $email; } }