data-validation-proximity 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -443,23 +443,20 @@ const variantSchema = joi.object({
|
|
|
443
443
|
img: joi.string().min(3),
|
|
444
444
|
price: joi.number().min(1).max(1000000),
|
|
445
445
|
quantity: joi.number().min(1).max(1000000),
|
|
446
|
-
characterstics: joi.
|
|
447
|
-
joi.
|
|
448
|
-
|
|
449
|
-
value: joi.string(),
|
|
450
|
-
})
|
|
446
|
+
characterstics: joi.object().pattern(
|
|
447
|
+
joi.string(),
|
|
448
|
+
joi.string()
|
|
451
449
|
),
|
|
450
|
+
available: joi().bool().optional()
|
|
452
451
|
});
|
|
453
452
|
|
|
454
453
|
const createVariantSchema = joi.object({
|
|
455
454
|
price: joi.number().min(1).required(),
|
|
456
455
|
quantity: joi.number().min(1).required(),
|
|
457
456
|
img: joi.string().min(3),
|
|
458
|
-
characterstics: joi.
|
|
459
|
-
joi.
|
|
460
|
-
|
|
461
|
-
value: joi.string().required(),
|
|
462
|
-
})
|
|
457
|
+
characterstics: joi.object().pattern(
|
|
458
|
+
joi.string(),
|
|
459
|
+
joi.string()
|
|
463
460
|
),
|
|
464
461
|
});
|
|
465
462
|
|