mirror of
https://github.com/iptv-org/api.git
synced 2025-05-12 10:00:07 -04:00
Create regions.js
This commit is contained in:
parent
b948139a9b
commit
a4bd22fae6
1 changed files with 15 additions and 0 deletions
15
scripts/db/schemes/regions.js
Normal file
15
scripts/db/schemes/regions.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const Joi = require('joi')
|
||||
|
||||
module.exports = {
|
||||
name: Joi.string()
|
||||
.regex(/^[\sA-Z\u00C0-\u00FF().,-]+$/i)
|
||||
.required(),
|
||||
code: Joi.string()
|
||||
.regex(/^[A-Z]{3,7}$/)
|
||||
.required(),
|
||||
countries: Joi.array().items(
|
||||
Joi.string()
|
||||
.regex(/^[A-Z]{2}$/)
|
||||
.allow('')
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue