Reputation: 592
I have a sequelize model with a validation like this:
validate: {
isEmail: {msg: 'This field must be an E-Mail!'}
}
It's working when I use .create()
method but not working when I use .update()
/.save()
methods. What did I do something wrong?
Thanks in advance.
Upvotes: 1
Views: 968
Reputation: 759
To validate the instance you can call .validate()
on the model instance as well.
Upvotes: 1