How to specify a max value for number widgets dynamically?

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:

router.put(
  "/test/:recordId",
  permissionMiddlewareCreator.update(),
  (request, response, next) => {
    if (request.body.data.attributes.FIELD_NAME > 123) {
      response
        .status(400)
        .json({ errors: [{ detail: "The field is invalid" }] });
    }

    // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/routes/default-routes#update-a-record
    next();
  }
);