edit fixes

This commit is contained in:
Jake Kasper
2025-08-21 21:05:15 -04:00
parent 33894dec6c
commit a0a9ec5411
3 changed files with 341 additions and 77 deletions

View File

@@ -80,7 +80,14 @@ const userProductSchema = Joi.object({
customName: Joi.string().max(255).allow(null).optional(),
customRateAmount: Joi.number().positive().allow(null).optional(),
customRateUnit: Joi.string().max(50).allow(null).optional(),
notes: Joi.string().allow(null, '').optional()
notes: Joi.string().allow(null, '').optional(),
// Additional fields for advanced editing
brand: Joi.string().max(100).allow(null).optional(),
categoryId: Joi.number().integer().positive().allow(null).optional(),
productType: Joi.string().valid('granular', 'liquid', 'seed', 'powder').allow(null).optional(),
activeIngredients: Joi.string().allow(null).optional(),
description: Joi.string().allow(null).optional(),
isAdvancedEdit: Joi.boolean().optional()
});
// Application validation schemas