# Set required using custom renderer

**URL:** <https://jsonforms.discourse.group/t/set-required-using-custom-renderer/1555>\
**Category:** General\
**Created:** [June 27, 2023, 5:07am UTC](https://jsonforms.discourse.group/t/set-required-using-custom-renderer/1555 "2023-06-27T05:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![howdyAnkit](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/howdyankit/32/563_2.png) [@howdyAnkit](https://jsonforms.discourse.group/u/howdyAnkit)\
**Post date:** [July 4, 2023, 9:25am UTC](https://jsonforms.discourse.group/t/set-required-using-custom-renderer/1555/6 "2023-07-04T09:25:24Z")

</div>

Not sure if youre hoping to put dependent required fields like when the value of Any select field name is A then gender field should become required you can achieve this using if-else validaiton

> [@If else Validation not happening on nested data](https://jsonforms.discourse.group/t/if-else-validation-not-happening-on-nested-data/1356):
>
> Hello I am new to Jsonforms and i am trying to do if then validation for a nested schema. I have my schema mentioned below i want the firstname to be required when the enum option is b and when it’s a or c it shouldnt be required. I can see ajv errors in console with this schema in console but cannot see in the ui getting rendered below the input field for firstname { "definitions": { "data": { "type": "object", "properties": { "startswith": { "type": "stri…

---

_[View the full topic](https://jsonforms.discourse.group/t/set-required-using-custom-renderer/1555)._
