How to get an error label to appear on failed validation

When using include fragment like

${ ui.includeFragment(“uicommons”, “fieldErrors”, [ fieldName: config.formFieldName ]) }

How do you get the error label to appear when validation fails? If I used the ‘required’ class on input for example the validation works and I can see a span like

But the display:none is never removed so the label never appears