/**
* @ORM\Column(type="string", length=255)
*
* @Assert\NotBlank(message="Please enter your name.", groups={"Registration", "Profile"})
* @Assert\MinLength(limit="3", message="The name is too short.", groups={"Registration", "Profile"})
* @Assert\MaxLength(limit="255", message="The name is too long.", groups={"Registration", "Profile"})
*/
protected $name;
Anotasi Anotasi anda mengandungi dua bahagian, medan entiti (Lajur) dan peraturan pengesahan (Tegaskan), yang masing-masing perlu ditakrifkan dalam dua fail Yml dalam Symfony.
Medan entiti:
http://symfony.com/doc/current/book/doctrine.html
Peraturan pengesahan:
http://symfony.com/doc/current/book/validation.html