https://g.co/gemini/share/ee696451749b


// src/Entity/Student.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

class Student
{
    #[Assert\AtLeastOneOf([
        new Assert\Regex('/#/'),
        new Assert\Length(min: 10),
    ])]
    protected string $plainPassword;

    #[Assert\AtLeastOneOf([
        new Assert\Count(min: 3),
        new Assert\All(
            new Assert\GreaterThanOrEqual(5)
        ),
    ])]
    protected array $grades;
}


Powered by Froala Editor