mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
24 lines
490 B
JavaScript
24 lines
490 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const joi = require('joi');
|
||
|
const { customJoi } = require('./util');
|
||
|
|
||
|
const tagTypeSchema = joi
|
||
|
.object()
|
||
|
.keys({
|
||
|
name: customJoi
|
||
|
.isUrlFriendly()
|
||
|
.min(2)
|
||
|
.max(50)
|
||
|
.required(),
|
||
|
description: joi.string().allow(''),
|
||
|
icon: joi.string().allow(''),
|
||
|
})
|
||
|
.options({
|
||
|
allowUnknown: false,
|
||
|
stripUnknown: true,
|
||
|
abortEarly: false,
|
||
|
});
|
||
|
|
||
|
module.exports = { tagTypeSchema };
|