/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank(message="Please enter your name.")
* @Assert\Length(
* min=3,
* max="255",
* minMessage="too short.",
* maxMessage="too long.",
* )
*/
protected $name;
The form will show the $name field label as name. Is there a way to define here the field label with annotations?
No. It's done in the form layer — be it a form type or a form builder using the label option or a Twig form_* function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With