mirror of
https://github.com/iptv-org/database.git
synced 2024-12-27 01:34:34 -05:00
19 lines
385 B
TypeScript
19 lines
385 B
TypeScript
|
import Joi from 'joi'
|
||
|
|
||
|
export default {
|
||
|
name: Joi.string()
|
||
|
.regex(/^[\sA-Z\u00C0-\u00FF().-]+$/i)
|
||
|
.required(),
|
||
|
code: Joi.string()
|
||
|
.regex(/^[A-Z]{2}$/)
|
||
|
.required(),
|
||
|
languages: Joi.array().items(
|
||
|
Joi.string()
|
||
|
.regex(/^[a-z]{3}$/)
|
||
|
.required()
|
||
|
),
|
||
|
flag: Joi.string()
|
||
|
.regex(/^[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]$/)
|
||
|
.required()
|
||
|
}
|