Update regions.js

This commit is contained in:
freearhey 2023-11-18 12:27:10 +03:00
parent 4574802a4f
commit 47bfeee518

View file

@ -1,15 +1,15 @@
const Joi = require('joi') const Joi = require('joi')
module.exports = { module.exports = {
name: Joi.string() name: Joi.string()
.regex(/^[\sA-Z\u00C0-\u00FF().,-]+$/i) .regex(/^[\sA-Z\u00C0-\u00FF().,-]+$/i)
.required(), .required(),
code: Joi.string() code: Joi.string()
.regex(/^[A-Z]{3,7}$/) .regex(/^[A-Z]{2,7}$/)
.required(), .required(),
countries: Joi.array().items( countries: Joi.array().items(
Joi.string() Joi.string()
.regex(/^[A-Z]{2}$/) .regex(/^[A-Z]{2}$/)
.required() .required()
) )
} }