-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.xml
executable file
·163 lines (159 loc) · 5.27 KB
/
example.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0"?>
<dto xmlns="micro:dto-1.6"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="micro:dto-1.6 ../src/Resource/schema/dto-1.6.xsd">
<class name="Simple\SimpleObject">
<property name="weight" type="int">
<validation>
<less_than value="10" />
</validation>
</property>
</class>
<class name="Simple\SimpleObject">
<property name="height" type="int">
<validation>
<less_than property_path="weight"/>
</validation>
</property>
</class>
<class name="Simple\SimpleObject">
<property name="parent" type="Simple\SimpleObject"/>
</class>
<class name="Simple\SimpleUser">
<property name="parent" type="Simple\SimpleObject"/>
<property name="username" type="string">
<validation>
<length min="6" max="50"/>
<regex pattern="/^(.[aA-zA]+)$/"/>
</validation>
</property>
<property name="age" type="int">
<validation>
<not_blank />
<greater_than value="18" />
<less_than value="100" />
<less_than value="200" groups="extended"/>
</validation>
</property>
<property name="email" type="string">
<validation>
<email/>
<not_blank/>
</validation>
</property>
<property name="ip" type="string">
<validation>
<ip/>
</validation>
</property>
<property name="hostname" type="string">
<validation>
<hostname />
<hostname ltd_required="true" groups="test"/>
</validation>
</property>
<property name="sometext" type="string">
<validation>
<regex pattern="/^(.[a-z])+$/"/>
</validation>
</property>
<property name="url" type="string">
<validation>
<url is_relative="true" />
</validation>
</property>
<property name="json" type="string">
<validation>
<not_blank/>
<json/>
</validation>
</property>
<property name="uuid" type="string">
<validation>
<not_blank />
<uuid />
</validation>
</property>
<property name="created_at" type="string">
<validation>
<datetime />
</validation>
</property>
<property name="updated_at" type="string">
<validation>
<date />
</validation>
</property>
<property name="timezone" type="string">
<validation>
<time_zone intl_compatible="true" country_code="BY" >
<zone value="PER_COUNTRY"/>
</time_zone>
</validation>
</property>
<property name="card_scheme" type="string">
<validation>
<not_blank />
<card_scheme schemes="MASTERCARD"/>
<luhn />
</validation>
</property>
<property name="bic" type="string">
<validation>
<not_blank />
<bic />
</validation>
</property>
<property name="currency" type="string">
<validation>
<not_blank />
<currency />
</validation>
</property>
<property name="iban" type="string">
<validation>
<not_blank />
<iban />
</validation>
</property>
<property name="isbn" type="string">
<validation>
<not_blank />
<isbn type="isbn13" />
</validation>
</property>
<property name="issn" type="string">
<validation>
<not_blank />
<issn />
</validation>
</property>
<property name="isin" type="string">
<validation>
<not_blank />
<isin />
</validation>
</property>
<property name="choice" type="string|int|float|array">
<validation>
<not_blank />
<choice choices="1, example, 0.001, true" />
</validation>
</property>
<property name="expression" type="string|int">
<validation>
<expression expression="this.getChoice() === excepted">
<variable name="excepted" value="example" />
</expression>
</validation>
</property>
</class>
<class name="User" description="Example class description" deprecated="Please, use gSON">
<property name="username" type="string|int" description="Username" deprecated="Deprecation message"/>
<property name="books" type="array" is_collection="true"/>
<property name="first_name" type="string|int" required="true"/>
<property name="updatedAt" type="date"/>
<property name="someclass" type="abstract"/>
<property name="testMixed" type="mixed"/>
</class>
</dto>