data-validation-proximity 1.2.3 → 1.2.5
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 +10 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -549,7 +549,7 @@ const storeAddressSchema = joi.object({
|
|
|
549
549
|
|
|
550
550
|
const schemaStore = joi.object({
|
|
551
551
|
name: joi.string().min(2).required(),
|
|
552
|
-
description: joi.string().min(3).max(
|
|
552
|
+
description: joi.string().min(3).max(1000).required(),
|
|
553
553
|
sellerId: joi.string().required(),
|
|
554
554
|
location: joi
|
|
555
555
|
.object({
|
|
@@ -583,25 +583,22 @@ exports.schemaStoreValidation = (req, res, next) => {
|
|
|
583
583
|
};
|
|
584
584
|
|
|
585
585
|
const schemaUpdateStore = joi.object({
|
|
586
|
-
name: joi.string().min(
|
|
587
|
-
description: joi.string().min(3).max(
|
|
586
|
+
name: joi.string().min(2),
|
|
587
|
+
description: joi.string().min(3).max(1000),
|
|
588
588
|
isActive: joi.bool(),
|
|
589
|
-
address: joi.object({
|
|
590
|
-
city: joi.string().min(3),
|
|
591
|
-
streetName: joi.string().min(3).max(40),
|
|
592
|
-
postalCode: joi.string().min(3),
|
|
593
|
-
country: joi.string().min(3),
|
|
594
|
-
countryCode: joi.string().min(2),
|
|
595
|
-
fullAdress: joi.string().min(3).max(40),
|
|
596
|
-
region: joi.string().min(3),
|
|
597
|
-
}),
|
|
598
|
-
policy: policySchema,
|
|
599
589
|
location: joi.object({
|
|
600
590
|
type: joi.string().valid('Point'),
|
|
601
591
|
coordinates: joi.array().items().length(2),
|
|
602
592
|
}),
|
|
593
|
+
address: storeAddressSchema,
|
|
603
594
|
workingTime: workingTimeSchema,
|
|
595
|
+
policy: policySchema,
|
|
604
596
|
image: joi.string().min(3),
|
|
597
|
+
storeCategories: joi.string(),
|
|
598
|
+
productCategories: joi.string(),
|
|
599
|
+
storeRayons: joi.string(),
|
|
600
|
+
template: joi.string(),
|
|
601
|
+
registrationNumber: joi.string(),
|
|
605
602
|
});
|
|
606
603
|
|
|
607
604
|
exports.schemaUpdateStoreValidation = (req, res, next) => {
|