Enabling and disabling required field dynamically

I am developing insert form I have a like this input fields and I want to do dynamicly enable and disable to required attribute in my input field . All field names , types , requirements etc returns from json file …

forexample;

<input dmx-show="columnDisplayType != 'INTEGER'" dmx-bind:type="'number'" class="form-control" dmx-bind:id="'decimal1'+$index" dmx-bind:name="columnName" dmx-bind:placeholder="columnName" >

BUT I NEED TO DO ;

<input dmx-show="columnDisplayType != 'INTEGER'" dmx-bind:type="'number'" class="form-control" dmx-bind:id="'integer'+$index" dmx-bind:name="columnName" dmx-bind:placeholder="columnName" required="" data-msg-required="test validation message">

I want to add this attribute to dynamic
can anyone guide me @patrick , @George , @Teodor

Community Page
Last updated: