EasyAdminBundle
EasyAdminBundle copied to clipboard
Validation collection field doesn't work
Description
I've added validation for fields inside collectionField (and option useEntryCrudForm) and it doesn't work
To Reproduce
public function configureFields(string $pageName): iterable
{
return [
AssociationField::new('rangeEntity', 'range')
->setColumns('col-md-10 col-xxl-10')
->setRequired(true),
NumberField::new('price', 'price')
->setColumns('col-md-10 col-xxl-10'),
NumberField::new('margin', 'margin')
->setColumns('col-md-10 col-xxl-10')
->setRequired(true),
];
}
public function configureFields(string $pageName): iterable
{
return [
CollectionField::new('priceItems', 'price_range')
->setColumns('col-md-8 col-xxl-8')
->onlyOnForms()
->useEntryCrudForm(PriceItemCrudController::class)
];
When I try save ... error appear:
Same here. I have a OneToMany relation and I would like my collection items to be rendered by using the corresponding crud controller. But when submitting the page of the "One" side, my validation constraints of my "Many" entity on entity properties are completely ignored