Collection edit not enforcing sequelize max validation correctly

Hi Forest Guys.
Today we noticed a strange behavior that we’re quite sure we never experienced since now. And this part of our code base have not been changed since months, actually…

We have a collection with “edit” feature enabled.

The collection has a field with a Sequelize validation, which sets a min and a max value for this integer field:

Screenshot 2024-06-17 at 15.04.20

When I edit and save the record from Forest, I get an error sayin that “The [undisclosed collection name] record you are traying to update is invalid.” .

In the form I can also see that Forest thinks that the validation is not respected in the above described field:

But in Sequelize min and max are inclusive (Validations & Constraints | Sequelize), so 23 is supposed to be a valid value in our case.

May you please help to understand what’s wrong here?

My versions from .forestadmin-schema.json:

  "meta": {
    "liana": "forest-express-sequelize",
    "liana_version": "9.2.6",
    "stack": {
      "database_type": "postgres",
      "engine": "nodejs",
      "engine_version": "20.12.1",
      "orm_version": "6.28.0"
    }
  }

Hello @Matteo

Thank you for your report.

We identified the culprit contribution on our side and just reverted it.

It should be released in around 30min.

Sorry for the inconvenience

Regards,
Nicolas

2 Likes

Thank you @nbouliol
I confirm that now it’s fixed :raised_hands:

Regards,
Matteo

1 Like