Sequelize beforeValidate this context changes between v5 and v6 LTS
Sequelize beforeValidate this context changes between v5 and v6 LTS Goal: read and modify instance field values inside a beforeValidate hook in a way that works consistently after upgrading from Sequelize v5 LTS to v6 LTS. In Sequelize v5, beforeValidate binds this to the model class, while v6 binds it to the model instance. Code that calls this.getDataValue