16 lines
310 B
JavaScript
Raw Normal View History

'use strict';
2021-11-03 19:31:57 +01:00
const { yup, validateYupSchema } = require('@strapi/utils');
const roleUpdateSchema = yup
.object()
.shape({
name: yup.string().min(1),
description: yup.string().nullable(),
})
.noUnknown();
module.exports = {
2021-11-03 19:31:57 +01:00
validateRoleUpdateInput: validateYupSchema(roleUpdateSchema),
};