forked from mrvautin/expressCart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditVariant.json
39 lines (39 loc) · 845 Bytes
/
editVariant.json
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
{
"$id": "editVariant",
"type": "object",
"properties": {
"product": {
"type": "string",
"format": "objectid"
},
"variant": {
"type": "string",
"format": "objectid"
},
"title": {
"type": "string",
"isNotEmpty": true,
"minLength": 2
},
"price": {
"type": "string",
"format": "amount"
},
"stock": {
"type": ["number", "null"]
}
},
"errorMessage": {
"isNotEmpty": "This is my custom error message",
"properties": {
"price": "Should be a full 2 decimal value. Eg: 10.99"
}
},
"required": [
"variant",
"product",
"title",
"price",
"stock"
]
}