wisdom #19
@@ -13,14 +13,14 @@ const insertContactSchema = Joi.object({
|
||||
"Phone number must be a valid Indonesian number in format +628XXXXXXXXX",
|
||||
}),
|
||||
is_active: Joi.boolean().required(),
|
||||
contact_type: Joi.string().max(255).required()
|
||||
contact_type: Joi.string().max(255).optional()
|
||||
});
|
||||
|
||||
const updateContactSchema = Joi.object({
|
||||
contact_name: Joi.string().min(3).max(100).required(),
|
||||
contact_name: Joi.string().min(3).max(100).optional(),
|
||||
contact_phone: Joi.string()
|
||||
.pattern(/^(?:\+62|0)8\d{7,10}$/)
|
||||
.required()
|
||||
.optional()
|
||||
.messages({
|
||||
"string.pattern.base":
|
||||
"Phone number must be a valid Indonesian number in format +628XXXXXXXXX",
|
||||
|
||||
Reference in New Issue
Block a user