start to simplify validation groups for person

This commit is contained in:
2021-12-16 21:21:40 +01:00
parent 6296c7a307
commit 14aab637eb
2 changed files with 9 additions and 16 deletions

View File

@@ -216,13 +216,12 @@ final class PersonController extends AbstractController
);
}
$form = $this->createForm(CreationPersonType::class, $person, [
'validation_groups' => ['create'],
])->add('editPerson', SubmitType::class, [
'label' => 'Add the person',
])->add('createPeriod', SubmitType::class, [
'label' => 'Add the person and create an accompanying period',
]);
$form = $this->createForm(CreationPersonType::class, $person)
->add('editPerson', SubmitType::class, [
'label' => 'Add the person',
])->add('createPeriod', SubmitType::class, [
'label' => 'Add the person and create an accompanying period',
]);
$form->handleRequest($request);