8000 [#5623] don't configure default constraint message · symfony/symfony-docs@45381ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 45381ac

Browse files
committed
[#5623] don't configure default constraint message
1 parent f64d406 commit 45381ac

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

reference/constraints/Bic.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ will contain a Business Identifier Code (BIC).
4848
AppBundle\Entity\Transaction:
4949
properties:
5050
businessIdentifierCode:
51-
- Bic:
52-
message: This is not a valid Business Identifier Code (BIC).
51+
- Bic: ~
5352
5453
.. code-block:: xml
5554
@@ -61,11 +60,7 @@ will contain a Business Identifier Code (BIC).
6160
6261
<class name="AppBundle\Entity\Transaction">
6362
<property name="businessIdentifierCode">
64-
<constraint name="Bic">
65-
<option name="message">
66-
This is not a valid Business Identifier Code (BIC).
67-
</option>
68-
</constraint>
63+
<constraint name="Bic" />
6964
</property>
7065
</class>
7166
</constraint-mapping>
@@ -84,9 +79,7 @@ will contain a Business Identifier Code (BIC).
8479
8580
public static function loadValidatorMetadata(ClassMetadata $metadata)
8681
{
87-
$metadata->addPropertyConstraint('businessIdentifierCode', new Assert\Bic(array(
88-
'message' => 'This is not a valid Business Identifier Code (BIC).',
89-
)));
82+
$metadata->addPropertyConstraint('businessIdentifierCode', new Assert\Bic());
9083
}
9184
}
9285

0 commit comments

Comments
 (0)
0