mirror of
https://github.com/iptv-org/api.git
synced 2025-05-12 18:10:07 -04:00
Create subdivisions.js
This commit is contained in:
parent
a4bd22fae6
commit
8e054c8035
1 changed files with 11 additions and 0 deletions
11
scripts/db/schemes/subdivisions.js
Normal file
11
scripts/db/schemes/subdivisions.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const Joi = require('joi')
|
||||
|
||||
module.exports = {
|
||||
country: Joi.string()
|
||||
.regex(/^[A-Z]{2}$/)
|
||||
.required(),
|
||||
name: Joi.string().required(),
|
||||
code: Joi.string()
|
||||
.regex(/^[A-Z]{2}-[A-Z0-9]{1,3}$/)
|
||||
.required()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue