Skip to content

Commit 086b885

Browse files
adamwojsdabrt
andauthored
IBX-5989: Fixed code snippet with attribute value form mapper implementation (#2263)
Co-authored-by: Tomasz Dąbrowski <[email protected]>
1 parent 4c1e4ea commit 086b885

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

code_samples/catalog/custom_attribute_type/src/Attribute/Percent/Form/PercentValueFormMapper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ public function createValueForm(
3434
];
3535

3636
if ($assignment->isRequired()) {
37-
$options['constraints'] = [
38-
new Assert\NotBlank(),
39-
];
37+
$options['constraints'][] = new Assert\NotBlank();
4038
}
4139

4240
$builder->add($name, PercentType::class, $options);

0 commit comments

Comments
 (0)