Hello @Matteo,
I’m happy to annonce that we rework the agent and the sequelize datasource in order to correctly support min
/max
sequelize validators.
To be capable of this we did add a new required feature (two new well known operators: GreaterThanOrEqual & LessThanOrEqual along side the same validators). It’s a nice improvement too to meet industry standards.
Example done with Sequelize
Sequelize model
sequelize.define('place', {
name: DataTypes.STRING,
address: DataTypes.STRING,
latitude: {
type: DataTypes.INTEGER,
validate: {
min: -90,
max: 90,
},
},
longitude: {
type: DataTypes.INTEGER,
validate: {
min: -180,
max: 180,
},
},
});
You can upgrade to the latest @forestadmin/datasource-sequelize
version and also bump to the latest @forestadmin/agent
version.
Let’s us know if it works for you.
Kind regards,
Morgan