Skip to content

Commit a328def

Browse files
committed
Merge pull request #951 from asm89/patch-3
Added XML configuration example to reference/constraints/Callback
2 parents d792c49 + 34ab886 commit a328def

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

reference/constraints/Callback.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ Setup
4040
- Callback:
4141
methods: [isAuthorValid]
4242
43+
.. code-block:: xml
44+
45+
<!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
46+
<class name="Acme\BlogBundle\Entity\Author">
47+
<constraint name="Callback">
48+
<option name="methods">
49+
<value>isAuthorValid</value>
50+
</option>
51+
</constraint>
52+
</class>
53+
4354
.. code-block:: php-annotations
4455
4556
// src/Acme/BlogBundle/Entity/Author.php

0 commit comments

Comments
 (0)