Error message on binder validation on the Vaadin 13

Three are three fields in the form and validation requires at least one field is input. I’ve used the Binder.withValidator to validate with customized message with error message being set on the statusLabel

binder.withValidator(bean -> true, "error....")
statusLabel = new Label()
binder.setStatusLabel(statusLabel)

I want to apply the error style on the statusLabel.addStytleName which had being used in the previous vaadin version. I could not figure it out how to do it on the Vaadin 13.

statusLabel.addStytleName(ValoTheme.LABEL_ERROR)

Do you have any suggestion on this?
Thanks

Vaadin 10+ onwards there is no Valo theme anymore. The new theming system we have is called Lumo. It is substantially different, and API’s are different.

There is no equivalent predefined style in Lumo for Label. So what you need to do is to define your own style, i.e. use label.addClassName("error-label"); and the add corresponding css in “shared-styles.html”.

Tatu Lund:
Vaadin 10+ onwards there is no Valo theme anymore. The new theming system we have is called Lumo. It is substantially different, and API’s are different.

There is no equivalent predefined style in Lumo for Label. So what you need to do is to define your own style, i.e. use label.addClassName("error-label"); and the add corresponding css in “shared-styles.html”.

Thanks for quick response.

Using css/style is quite straightforward approach.
The reason I am asking is to keep the error style in sync with validation error of HasValidation fields when the theme is changed.