iptv-database/scripts/db/schemes/countries.js
Aleksandr Statciuk 26d5bf0436 Init
2022-02-12 05:55:50 +03:00

16 lines
352 B
JavaScript

const Joi = require('joi')
module.exports = {
name: Joi.string()
.regex(/^[\sA-Z\u00C0-\u00FF().-]+$/i)
.required(),
code: Joi.string()
.regex(/^[A-Z]{2}$/)
.required(),
lang: Joi.string()
.regex(/^[a-z]{3}$/)
.required(),
flag: Joi.string()
.regex(/^[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]$/)
.required()
}