Validation field with admin Yes/No config value, so that am adding helper file to get config enable value to validate the field. So i want to call this value with if condition in html ko file.
<div class="control">
<input
id="vat_id"
name="vat_id"
type="text"
data-bind="attr : { placeholder: $t(getPlaceholder('vat_id')) }, textInput : address.vatId"
data-validate="{ required : true }" // here i need if condition like <?php if($val)==1 { ?> data-validate="{ required : true }" <?php }else { ?> data-validate="" <?php } ?>
class="required validate-vat-number"/>
</div>
My helper file code
public function ValidationEnable() {
return $this->scopeConfig->getValue('step/return/validatation_activate', ScopeInterface::SCOPE_STORE);
}
I want to add this helper function in html ko file. In phtml I know, how to do it in html ko file