Making fields required/mandatory

I would like to make some fields mandatory on one of my collections, which means it would not be possible to create/edit a record without specifying the field.
I’ve googled around, read the documentation, and I can’t find any information on this.

Is it possible?

Here : https://docs.forestadmin.com/documentation/reference-guide/actions/create-a-record
I see: “Once on the creation form, fill out all required fields as per your database’s constraints”

Does it mean ForestAdmin is aware of which database table columns have a NOT NULL constraint?

Hi @francois_Ruty,

You can use allowNull: false in the right model fields definition.
(more information available here: https://sequelize.org/v5/manual/models-definition.html)

It will automatically make those fields required on record create/update.

Let me know if it does not help.

2 Likes

ok thanks I’ll do that (sorry for this extra text need to be above 40 chars…)

2 Likes