Skip to content

Commit 5d2d749

Browse files
committed
chore: add from schema dummy data
1 parent b166635 commit 5d2d749

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

tests/unit/data/formSchema.js

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
export default {
2+
fields: [
3+
{
4+
type: 'input',
5+
inputType: 'input',
6+
label: 'ID',
7+
name: 'input',
8+
model: 'id',
9+
readonly: true,
10+
disabled: true,
11+
validate: {
12+
required: true
13+
}
14+
},
15+
{
16+
type: 'input',
17+
inputType: 'password',
18+
label: 'Password',
19+
name: 'password',
20+
placeholder: 'Type password',
21+
model: 'password',
22+
validate: {
23+
required: true
24+
}
25+
},
26+
{
27+
type: 'input',
28+
inputType: 'password',
29+
label: 'Password confirm',
30+
name: 'passwordConfirm',
31+
placeholder: 'Type password',
32+
model: 'passwordConfirm',
33+
validate: {
34+
required: true,
35+
confirmed: 'password'
36+
}
37+
},
38+
{
39+
type: 'select',
40+
label: 'Skills',
41+
model: 'skills',
42+
name: 'skills',
43+
placeholder: 'Select',
44+
options: [
45+
{ label: 'label 1', value: 1 },
46+
{ label: 'label 2', value: 2 },
47+
{ label: 'label 3', value: 3 }
48+
],
49+
validate: {
50+
required: true,
51+
included: [1, 2]
52+
}
53+
},
54+
{
55+
type: 'input',
56+
inputType: 'input',
57+
label: 'Email',
58+
name: 'email',
59+
placeholder: 'Type email',
60+
model: 'email',
61+
validate: {
62+
required: true,
63+
email: true
64+
}
65+
},
66+
{
67+
type: 'checkbox',
68+
label: 'Status',
69+
name: 'status',
70+
checkboxLabel: 'Some text',
71+
model: 'status',
72+
validate: {
73+
required: [true]
74+
}
75+
},
76+
{
77+
type: 'checkbox',
78+
label: 'Addons',
79+
name: 'addons',
80+
model: 'addons',
81+
options: [
82+
{ label: 'label 1', value: 1 },
83+
{ label: 'label 2', value: 2 },
84+
{ label: 'label 3', value: 3 }
85+
],
86+
validate: {
87+
required: true
88+
}
89+
},
90+
{
91+
type: 'radio',
92+
label: 'Delivery',
93+
name: 'delivery',
94+
model: 'delivery',
95+
options: [
96+
{ label: 'label 1', value: 1 },
97+
{ label: 'label 2', value: 2 },
98+
{ label: 'label 3', value: 3 }
99+
],
100+
validate: {
101+
required: true
102+
}
103+
},
104+
{
105+
type: 'input',
106+
inputType: 'textarea',
107+
name: 'comment',
108+
label: 'Comment',
109+
model: 'comment',
110+
validate: {
111+
required: true,
112+
min: 10
113+
}
114+
},
115+
{
116+
type: 'actions',
117+
buttons: [
118+
{
119+
type: 'cancel',
120+
buttonType: 'default',
121+
buttonLabel: 'Cancel'
122+
},
123+
{
124+
type: 'submit',
125+
buttonType: 'success',
126+
buttonLabel: 'Submit'
127+
}
128+
]
129+
}
130+
],
131+
formOptions: {
132+
labelPosition: 'right',
133+
labelWidth: '120px'
134+
}
135+
}

0 commit comments

Comments
 (0)