Skip to content

Commit

Permalink
[#5623] don't configure default constraint message
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Oct 12, 2015
1 parent f64d406 commit 45381ac
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions reference/constraints/Bic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ will contain a Business Identifier Code (BIC).
AppBundle\Entity\Transaction:
properties:
businessIdentifierCode:
- Bic:
message: This is not a valid Business Identifier Code (BIC).
- Bic: ~
.. code-block:: xml
Expand All @@ -61,11 +60,7 @@ will contain a Business Identifier Code (BIC).
<class name="AppBundle\Entity\Transaction">
<property name="businessIdentifierCode">
<constraint name="Bic">
<option name="message">
This is not a valid Business Identifier Code (BIC).
</option>
</constraint>
<constraint name="Bic" />
</property>
</class>
</constraint-mapping>
Expand All @@ -84,9 +79,7 @@ will contain a Business Identifier Code (BIC).
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('businessIdentifierCode', new Assert\Bic(array(
'message' => 'This is not a valid Business Identifier Code (BIC).',
)));
$metadata->addPropertyConstraint('businessIdentifierCode', new Assert\Bic());
}
}
Expand Down

0 comments on commit 45381ac

Please sign in to comment.