data-validation-proximity 1.3.12 → 1.3.14

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.
Files changed (2) hide show
  1. package/index.js +4 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -229,6 +229,7 @@ const userSchema = joi.object({
229
229
  then: joi.required(),
230
230
  otherwise: joi.forbidden()
231
231
  }),
232
+ preferredLanguage: joi.string().valid('en', 'fr', 'ar').optional(),
232
233
  });
233
234
 
234
235
  exports.userSchemaValidation = createValidationMiddleware(userSchema);
@@ -306,6 +307,8 @@ const updateSchema = joi.object({
306
307
  discountCode: joi.string().min(3),
307
308
  companyName: joi.string().min(3),
308
309
  shippingAdress: joi.object({
310
+ latitude: joi.number(),
311
+ longitude: joi.number(),
309
312
  countryCode: joi.string().min(2),
310
313
  country: joi.string().min(3),
311
314
  city: joi.string().min(3),
@@ -320,6 +323,7 @@ const updateSchema = joi.object({
320
323
  tags: joi.string().allow(null),
321
324
  notification: joi.string().allow(null),
322
325
  proximityRange: joi.number().min(0).max(1000),
326
+ preferredLanguage: joi.string().valid('en', 'fr', 'ar').optional(),
323
327
  });
324
328
 
325
329
  exports.updateSchemaValidation = createValidationMiddleware(updateSchema, (req) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-validation-proximity",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "A library of Joi-based validation middlewares for Express.js",
5
5
  "main": "index.js",
6
6
  "license": "MIT",