diff --git a/validate/device.schema.js b/validate/device.schema.js index c054b02..c7182cb 100644 --- a/validate/device.schema.js +++ b/validate/device.schema.js @@ -15,7 +15,8 @@ const insertDeviceSchema = Joi.object({ .required() .messages({ 'string.ip': 'IP address must be a valid IPv4 or IPv6 address' - }) + }), + listen_channel: Joi.string().max(100).required() }); const updateDeviceSchema = Joi.object({ @@ -28,11 +29,11 @@ const updateDeviceSchema = Joi.object({ .ip({ version: ['ipv4', 'ipv6'] }) .messages({ 'string.ip': 'IP address must be a valid IPv4 or IPv6 address' - }) + }), + listen_channel: Joi.string().max(100) }).min(1); -// ✅ Export dengan CommonJS module.exports = { insertDeviceSchema, updateDeviceSchema }; \ No newline at end of file