HI,
We have custom validation attribute RequiredIf decorated on date property of model. but generated html is not adding required attribute to the tag as shown below
Class Property
[RequiredIf("chkM", 1, "Date is Required")]
public DateTime? MDate { get; set; }
<ejs-datepicker id="MDate" format="dd/MM/yyyy" ejs-for="MDate" placeholder="Choose a Date" enabled="true"></ejs-datepicker>
it is generating following html
<input onchange="datecheck()" id="MDate" data-val="true" name="MDate" ejs-for="true" class="e-control e-datepicker e-lib e-input e-keyboard" placeholder="Choose a Date" aria-placeholder="Choose a Date" aria-live="assertive" aria-atomic="true" aria-haspopup="true" aria-activedescendant="null" aria-owns="MDate_options" aria-expanded="false" role="combobox" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" aria-invalid="false" aria-disabled="false" tabindex="0" value="">
I am expecting following attribute also in tag
<input type="text" data-val="true" data-val-requiredif=" Date is Required" data-val-requiredif-dependentproperty="chkM" data-val-requiredif-targetvalue="1" id="MDate" name="MDate" value="">