Addmore/delelelast button

hello i’m new in javascript.
i have a type array in my shema with title like “T#1-3” or “T#3+”
I would like that we can no longer add fields with the + button when we exceed 3 additions for the first case and set direcly 3 when at the start for the second case.
Is it possible?
thank for reading my question.

[original thread by unset-pear]

Hi @unset-pear(unset-pear), you can set maxItems: 3 in your JSON Schema. This will show a validation error when the user adds more than 3 entries but the add button will not be disabled. For that you will need to implement a custom renderer.
The second case can be solved with a default: entry in your schema and configuring Ajv accordingly. If that is not flexible enough for your use case you can of course also solve this with a custom renderer.

[unset-pear]

thank you it’s work