add: validate is_active
This commit is contained in:
@@ -7,14 +7,16 @@ const insertStatusSchema = Joi.object({
|
||||
status_number: Joi.number().integer().required(),
|
||||
status_name: Joi.string().max(200).required(),
|
||||
status_color: Joi.string().max(200).required(),
|
||||
status_description: Joi.string().allow('', null)
|
||||
status_description: Joi.string().allow('', null),
|
||||
is_active: Joi.boolean().required(),
|
||||
});
|
||||
|
||||
const updateStatusSchema = Joi.object({
|
||||
status_number: Joi.number().integer(),
|
||||
status_name: Joi.string().max(200),
|
||||
status_color: Joi.string().max(200),
|
||||
status_description: Joi.string().allow('', null)
|
||||
status_number: Joi.number().integer().optional(),
|
||||
status_name: Joi.string().max(200).optional(),
|
||||
status_color: Joi.string().max(200).optional(),
|
||||
status_description: Joi.string().allow('', null).optional(),
|
||||
is_active: Joi.boolean().optional()
|
||||
}).min(1);
|
||||
|
||||
// ✅ Export dengan CommonJS
|
||||
|
||||
Reference in New Issue
Block a user