fix(logistique) : bloque les caractères spéciaux dans le champ « Autre »
Pull Request — Quality gate / Backend (PHP CS + PHPUnit) (pull_request) Failing after 1m7s
Pull Request — Quality gate / Frontend (lint + Vitest + build) (pull_request) Successful in 1m36s

Assert\Regex(FREE_TEXT) sur otherLabel (miroir companyName/competitors) + masque
FREE_TEXT_MASK sur l'input « Autre » (new.vue / edit.vue).
This commit is contained in:
2026-06-29 10:52:02 +02:00
parent 4ce1bafb2f
commit 8a042fb578
4 changed files with 43 additions and 0 deletions
@@ -20,6 +20,7 @@ use App\Shared\Domain\Attribute\Auditable;
use App\Shared\Domain\Contract\BlamableInterface;
use App\Shared\Domain\Contract\TimestampableInterface;
use App\Shared\Domain\Trait\TimestampableBlamableTrait;
use App\Shared\Domain\Validation\TextInputPattern;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
@@ -226,6 +227,7 @@ class WeighingTicket implements TimestampableInterface, BlamableInterface
/** Libelle libre — requis ssi counterpartyType = AUTRE (RG-5.03). */
#[ORM\Column(name: 'other_label', length: 255, nullable: true)]
#[Assert\Length(max: 255, maxMessage: 'Le libellé ne peut pas dépasser {{ limit }} caractères.', normalizer: 'trim')]
#[Assert\Regex(pattern: TextInputPattern::FREE_TEXT, message: TextInputPattern::FREE_TEXT_MESSAGE)]
#[Groups(['weighing_ticket:read', 'weighing_ticket:write'])]
private ?string $otherLabel = null;