Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boshurik/unique-model-constraint


https://github.com/boshurik/unique-model-constraint

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Unique Model Symfony Constraint [![Build Status](https://travis-ci.com/BoShurik/unique-model-constraint.svg?branch=master)](https://travis-ci.com/BoShurik/unique-model-constraint)

Port of `UniqueEntity` constraint

## Installation

```bash
composer require boshurik/unique-model-constraint
```

## Symfony integration

```yaml
services:
_defaults:
autowire: true
autoconfigure: true

BoShurik\Constraints\Model\UniqueModelValidator: ~
```

without `autoconfigure`:

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