What are the best practices when it comes to putting validation constraints into your projects?
In most cases you keep it in Entities or FormTypes?
What are the pros and cons?
Here is what i mean:
FormType example
$builder
->add('firstName', TextType::class, array(
'constraints' => array(
new NotBlank(),
),
))
;
Entity example
class Author
{
/**
* @Assert\NotBlank()
*/
protected $firstName;
}