In UIs ko template for an input field...
theme\Magento_Ui\web\templates\form\element\input.html
I would like it to have the class "required" depending on if the field's input actually IS required.
By default the template looks like this:
<input class="input-text" type="text" data-bind="
value: value,
valueUpdate: 'keyup',
hasFocus: focused,
attr: {
name: inputName,
placeholder: placeholder,
'aria-describedby': getDescriptionId(),
'aria-required': required,
'aria-invalid': error() ? true : 'false',
id: uid,
disabled: disabled
}" />
Is there any way to know whether the currently rendered field is required or not?
Bonus question: how would I find out what kind of data is available to this template and how do I access it?