Skip to content

Commit be3660d

Browse files
committed
components: brand[brand_validation]
1 parent 87bd0f1 commit be3660d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/brand/brand_validation.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Joi from "joi";
2+
3+
const addBrandValidation = Joi.object({
4+
name: Joi.string().required().trim(),
5+
});
6+
7+
const updateBrandValidation = Joi.object({
8+
name: Joi.string().required().trim(),
9+
id: Joi.string().hex().length(24).required(),
10+
});
11+
12+
const deleteBrandValidation = Joi.object({
13+
id: Joi.string().hex().length(24).required(),
14+
});
15+
16+
export { addBrandValidation, updateBrandValidation, deleteBrandValidation };

0 commit comments

Comments
 (0)