Skip to content

Commit 64e6e3b

Browse files
authored
Update UniqueEntity.rst
1 parent ee9b2c4 commit 64e6e3b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,18 @@ between all of the rows in your user table:
110110
// DON'T forget the following use statement!!!
111111
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
112112
113-
use Symfony\Component\Validator\Constraints as Assert;
114-
115113
class UserType extends AbstractType
116114
{
117115
// ...
118116
119117
public function configureOptions(OptionsResolver $resolver): void
120118
{
121119
$resolver->setDefaults([
120+
// ...
122121
'data_class' => User::class,
123122
'constraints' => [
124123
new UniqueEntity(fields: ['email']),
125-
]
124+
],
126125
]);
127126
}
128127
}

0 commit comments

Comments
 (0)