Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boshurik/unique-model-constraint
https://github.com/boshurik/unique-model-constraint
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/boshurik/unique-model-constraint
- Owner: BoShurik
- License: mit
- Created: 2020-10-20T16:45:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-22T11:01:53.000Z (about 4 years ago)
- Last Synced: 2024-10-12T23:11:08.807Z (3 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: trueBoShurik\Constraints\Model\UniqueModelValidator: ~
```without `autoconfigure`:
```yaml
services:
BoShurik\Constraints\Model\UniqueModelValidator:
arguments:
- '@doctrine' # @doctrine_mongodb
tags: ['validator.constraint_validator']
```