Product create and update validation added
This commit is contained in:
parent
27acb26590
commit
3c6f0cadce
@ -14,10 +14,20 @@ module.exports = (sequelize, DataTypes) => {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
unique: true,
|
||||
validate: {
|
||||
len: {
|
||||
args: [0, 10],
|
||||
msg: "Invalid HS Code: maximum length is 10 digits."
|
||||
}}
|
||||
},
|
||||
hs_description: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
validate: {
|
||||
len: {
|
||||
args: [0, 1000],
|
||||
msg: "HS Description is too long. Maximum allowed length is 1000 characters."
|
||||
}}
|
||||
},
|
||||
unit_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user