You could write:

``` php
use Symfony\Component\Validator\Constraints as Assert;

class Model
{
    /**
     * @Assert\NotBlank()
     */
    private $name;
}
```

See: http://symfony.com/doc/current/book/validation.html