I am currently using virtual elements to display validation errors (there can be more than 1 per path).
<div data-bind="foreach: validationErrors">
<!-- ko if: path == 'title' && type == 'validation' -->
<div class="field-validation-error text-danger" data-bind="text: message"></div>
<!-- /ko -->
</div>
An example error that will be consumed by this is:
{
path: 'title',
type: 'validation',
message: 'Title is required'
}
How can I achieve the same thing using a custom binding? I can't seem to find an intelligible example close enough to what I'm doing to be of any use.