From f7efe9bfe1e61b4f8b8a4116b69a1f2c9dc2e911 Mon Sep 17 00:00:00 2001 From: Fisayo Date: Sat, 13 Jun 2020 10:36:56 +0100 Subject: [PATCH] Create validation rule for updating exising Department object --- src/api/utils/validationRules.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/utils/validationRules.js b/src/api/utils/validationRules.js index a60abf5..e9fcd84 100644 --- a/src/api/utils/validationRules.js +++ b/src/api/utils/validationRules.js @@ -32,14 +32,14 @@ export const updateEmployeeSchema = { export const createDepartmentSchema = { body: Joi.object().keys({ - departmentName: Joi.string().min(2).max(100).required(), + departmentName: Joi.string().min(2).max(90).required(), managerId: Joi.number().required(), }), }; export const updateDepartmentSchema = { body: Joi.object().keys({ - departmentName: Joi.string().min(2).max(100).required(), + departmentName: Joi.string().min(2).max(90).required(), managerId: Joi.number().required(), }), params: Joi.object().keys({