mirror of
https://github.com/iptv-org/api.git
synced 2025-05-12 10:00:07 -04:00
Create countries.js
This commit is contained in:
parent
8e2a9d8afb
commit
d43a3c24ae
1 changed files with 16 additions and 0 deletions
16
scripts/db/schemes/countries.js
Normal file
16
scripts/db/schemes/countries.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
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()
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue