How to specify a max value for number widgets dynamically?

Feature(s) impacted

Collections and the edit view

Observed behavior

I am unable to specify the maximum value that a number input can handle dynamically

Expected behavior

I’d like to specify the maximum value my number input can handle dynamically. I have a participants limit input that is not read-only and the participants limit is set by the environment variables of another micro-service. When a request is made from my Forest’s back office, a bridge is made to the specific micro-service whom handle it. The micro-service will then send a participant limit and I want to set this value as the maximum value of the input in the edit view.

How can I make it dynamically ?


Please provide in this mandatory section, the relevant information about your configuration:

  • Project name: Back Office TR
  • Team name:
  • Environment name: Development

Hello @KamilH

It is currently not possible to customize frontend validators dynamically in the detail-view.

You can however

  • Create smartfields with logic to postprocess the data entered by the user.
  • Override the route to add validation from the agent

with a smartfield: How to format a field on the add form on forestadmin?

with a route override:

  (request, response, next) => {
    if ( > 123) {
        .json({ errors: [{ detail: "The field is invalid" }] });

    // Learn what this route does here: