express-cart-tea
Version:
A fully functioning Node.js shopping cart with Stripe, PayPal and Authorize.net payments.
34 lines • 763 B
JSON
{
"$id": "newVariant",
"type": "object",
"properties": {
"product": {
"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": [
"product",
"title",
"price",
"stock"
]
}