Closed kevinG73 closed 3 years ago
If you want to validate nested items, you must add the @Assert\Valid
at the property level this way
/**
* @ORM\Entity()
*/
class Area extends AbstractTranslatable
{
/**
* @Assert\Valid
* @ORM\OneToMany(targetEntity="App\Entity\AreaTranslation", mappedBy="translatable", fetch="EXTRA_LAZY", indexBy="locale", cascade={"PERSIST"}, orphanRemoval=true)
* @Groups({"your_custom_group_read", "your_custom_group_write", "translations"})
*/
protected $translations;
}
Hello , I tried to use Constraints such as : length or NotBlank but it seems be ignored
AreaTranslation.php