boshurik/unique-model-constraint

Unique model validator for doctrine ORM and ODM

1.0.0 2020-10-20 16:53 UTC

This package is auto-updated.

Last update: 2024-10-22 20:32:41 UTC


README

Port of UniqueEntity constraint

Installation

composer require boshurik/unique-model-constraint

Symfony integration

services:
    _defaults:
        autowire: true
        autoconfigure: true

    BoShurik\Constraints\Model\UniqueModelValidator: ~

without autoconfigure:

services:
    BoShurik\Constraints\Model\UniqueModelValidator:
        arguments:
            - '@doctrine' # @doctrine_mongodb
        tags: ['validator.constraint_validator']