1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/services/tag-type-schema.js

24 lines
508 B
JavaScript
Raw Normal View History

'use strict';
const joi = require('joi');
const { customJoi } = require('../routes/admin-api/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 };