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

26 lines
507 B
JavaScript
Raw Normal View History

'use strict';
const joi = require('joi');
const { customJoi } = require('../routes/admin-api/util');
const tagSchema = joi
.object()
.keys({
value: joi
.string()
.min(2)
.max(50),
type: customJoi
.isUrlFriendly()
.min(2)
.max(50)
.default('simple'),
})
.options({
allowUnknown: false,
stripUnknown: true,
abortEarly: false,
});
module.exports = { tagSchema };