File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,24 @@ Basic Usage
29
29
- Email :
30
30
message : The email "{{ value }}" is not a valid email.
31
31
checkMX : true
32
-
32
+ .. code-block :: xml
33
+
34
+ <!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
35
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
36
+ <constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
37
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
38
+ xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
39
+
40
+ <class name =" Acme\BlogBundle\Entity\Author" >
41
+ <property name =" email" >
42
+ <constraint name =" Email" >
43
+ <option name =" message" >The email "{{ value }}" is not a valid email.</option >
44
+ <option name =" checkMX" >true</option >
45
+ </constraint >
46
+ </property >
47
+ </class >
48
+ </constraint-mapping >
49
+
33
50
.. code-block :: php-annotations
34
51
35
52
// src/Acme/BlogBundle/Entity/Author.php
You can’t perform that action at this time.
0 commit comments