assert description max length (#767)

This commit is contained in:
Paul Andrieux 2025-08-18 17:35:59 +02:00 committed by Paul Andrieux
parent a2aa826202
commit f948537e31

View file

@ -61,6 +61,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, ImageIn
private const EMAIL_MAX_LENGTH = 180; private const EMAIL_MAX_LENGTH = 180;
private const NAME_LENGTH = 180; private const NAME_LENGTH = 180;
private const DESCRIPTION_LENGTH = 255;
private const PHONE_LENGTH = 15; private const PHONE_LENGTH = 15;
private const SCHEDULE_LENGTH = 180; private const SCHEDULE_LENGTH = 180;
@ -241,6 +242,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, ImageIn
* User's description. * User's description.
*/ */
#[ORM\Column(type: 'string', nullable: true, )] #[ORM\Column(type: 'string', nullable: true, )]
#[Assert\Length(max: self::DESCRIPTION_LENGTH)]
private ?string $description = null; private ?string $description = null;
/** /**