From 1f4212f03053b8c7ddf77fb00a408dbc516fe107 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 24 Oct 2022 03:43:21 +0300 Subject: [PATCH] Update countries.js --- scripts/db/schemes/countries.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/db/schemes/countries.js b/scripts/db/schemes/countries.js index eee92bdd..31e737ac 100644 --- a/scripts/db/schemes/countries.js +++ b/scripts/db/schemes/countries.js @@ -7,9 +7,11 @@ module.exports = { code: Joi.string() .regex(/^[A-Z]{2}$/) .required(), - lang: Joi.string() - .regex(/^[a-z]{3}$/) - .required(), + languages: Joi.array().items( + Joi.string() + .regex(/^[a-z]{3}$/) + .required() + ), flag: Joi.string() .regex(/^[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]$/) .required()