You limit a contributor’s note to 200 characters. An editor can write 500. The same object arrives in an overnight import that needs its own validation rule.
From form to background job
On October 28, Symfony showed how functions like is_granted() can be used in constraints such as When and Expression with Validator and Security installed. These validation expressions require a request. Evaluation in console or a Messenger worker raises an exception. As of November 20, the release page lists 8.2.0-BETA2 and PHP 8.4 or higher.
What to check in your application
In a test project, submit a 240-character note under each role. Expect a rejection for the contributor and acceptance for the editor. Then run validation outside a request. Give the import an explicit rule independent of the session and test it at both length limits.
The constraint validates the value. The application must also authorize the operation itself. Keep separate assertions for both in your tests.