Skip to content

Commit

Permalink
Add "User" validation group to be compatible with upcoming user-bundl…
Browse files Browse the repository at this point in the history
…e release
  • Loading branch information
core23 committed Aug 10, 2023
1 parent aadab6e commit 5601256
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Action/ResetAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function __invoke(Request $request, string $token): Response
'action' => $this->router->generate('nucleos_user_admin_security_check', [
'token' => $token,
]),
'validation_groups' => ['ResetPassword', 'Default'],
'validation_groups' => ['ResetPassword', 'User', 'Default'],
]);

$form->handleRequest($request);
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Model/GroupAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function createNewInstance(): object

protected function configureFormOptions(array &$formOptions): void
{
$formOptions['validation_groups'] = $this->isNewInstance() ? 'Registration' : 'Profile';
$formOptions['validation_groups'] = ['Group', $this->isNewInstance() ? 'Registration' : 'Profile'];
}

protected function configureListFields(ListMapper $list): void
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Model/UserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function preUpdate($object): void

protected function configureFormOptions(array &$formOptions): void
{
$formOptions['validation_groups'] = $this->isNewInstance() ? 'Registration' : 'Profile';
$formOptions['validation_groups'] = ['User', $this->isNewInstance() ? 'Registration' : 'Profile'];
}

protected function configureExportFields(): array
Expand Down

0 comments on commit 5601256

Please sign in to comment.