# RangeError: Maximum call stack size exceeded for dropdown with 200 items

**URL:** <https://jsonforms.discourse.group/t/rangeerror-maximum-call-stack-size-exceeded-for-dropdown-with-200-items/1642>\
**Category:** General\
**Created:** [August 2, 2023, 6:28am UTC](https://jsonforms.discourse.group/t/rangeerror-maximum-call-stack-size-exceeded-for-dropdown-with-200-items/1642 "2023-08-02T06:28:27Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [November 9, 2023, 12:25pm UTC](https://jsonforms.discourse.group/t/rangeerror-maximum-call-stack-size-exceeded-for-dropdown-with-200-items/1642/8 "2023-11-09T12:25:28Z")

</div>

Hi @adanielyan, @collegewap,

It seems the error comes from the validation framework Ajv we are using, see this open issue ([ajv-validator/ajv#1705](https://github.com/ajv-validator/ajv/issues/1705)).

There’s not much we can do about that except for waiting for a fix. However there are some workarounds you can use:

- Restructure your schema to not use so many `oneOf`. Instead use `enum`. If you used the `oneOf` constructs to render different labels for your enums, you can use the [JSON Forms `i18n` support](https://jsonforms.io/docs/i18n) instead to deliver alternative labels for the enums. Or,
- Turn off validation within JSON Forms by handing over `validationMode="NoValidation"`. Then whenever you receive a data event from JSON Forms, you can validate it yourself outside. You can also use AJV for this. Once validated, you hand over the determined errors via the `additionalErrors` prop back to `JsonForms`. The clue: You validate with a modified `schema` in which you removed the `oneOf` construct. You will lose the validation for that specific part, but all the remaining validations will work as before.

I hope this helps. Let me know if you have questions.

---

_[View the full topic](https://jsonforms.discourse.group/t/rangeerror-maximum-call-stack-size-exceeded-for-dropdown-with-200-items/1642)._
