PHP code example of dayploy / entity-does-not-exists-validation-constraint

1. Go to this page and download the library: Download dayploy/entity-does-not-exists-validation-constraint 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/ */

    

dayploy / entity-does-not-exists-validation-constraint example snippets


namespace App\Message\Command;

use Dayploy\Validator\Constraint\EntityDoesNotExist;
use Symfony\Component\Validator\Constraints as Assert;

final class CreateUser
{
    #[EntityDoesNotExist(entity: User::class, property: 'id')]
    private Uuid $id;
    // ...