From 03d0a54dae1b800cc49d5e5a9266f8524956a1f6 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 18 Oct 2022 18:37:42 +0300 Subject: [PATCH] Update channels.js --- scripts/db/schemes/channels.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/db/schemes/channels.js b/scripts/db/schemes/channels.js index 333c71f9..085b7cc2 100644 --- a/scripts/db/schemes/channels.js +++ b/scripts/db/schemes/channels.js @@ -8,10 +8,11 @@ module.exports = { name: Joi.string() .regex(/^[\sa-z\u00C0-\u00FF0-9-čâộăšİ!:&.+'/»#%°$@?()¡]+$/i) .required(), - native_name: Joi.string() - .regex(/^[^",]+$/) - .invalid(Joi.ref('name')) - .allow(null), + alt_names: Joi.array().items( + Joi.string() + .regex(/^[^",]+$/) + .invalid(Joi.ref('name')) + ), network: Joi.string() .regex(/^[^",]+$/) .allow(null),