This is my code
User.init({
email: {
type: DataTypes.STRING,
validate: {
isEmail: {
args: true,
msg: "Invalid email format"
},
notEmpty: {
args: true,
msg: 'Cannot be blank'
},
unique: {
args: true,
msg: "Email must be unique"
}
},
}
I check using Postman. I register as a new user but the “Invalid validator function: unique” shows up instead of being registered.