In Symfony 3, its not allowed to use cascade_validation anymore. So you have to make an Assert for the types. But it doesn't work, the form is valid even when a field is BLANK but the Assert said NOtBlank. I have a class Participants and I want to check the Adults ArrayCollection when checking my participant Model.
//Participant Model
/**
* @var ArrayCollection
* @Assert\All({
* @Assert\Type(type="My\WebsiteBundle\Model\Adult"),
* })
*/
protected $adults;
//Adult Model
class Adult
{
/**
* @var string
*
* @Assert\NotBlank()
*/
protected $salutation;
/**
* @var string
*
* @Assert\NotBlank()
*/
protected $firstname;
/**
* @var string
*
* @Assert\NotBlank()
*/
protected $lastname;