Flow equivalent of setComponentError

I have Vaadin 8 code that I’m porting to Vaadin 14 that uses setComponentError on a TextArea to send a message to the user. The V8 code is something like this:

field.setComponentError(new UserError("Make sure only one row is returned.", AbstractErrorMessage.ContentMode.TEXT, ErrorLevel.WARNING));

In Vaadin 8 this would show an exclamation mark and a message to the user when hovering over the exclamation mark. The field is also highlighted in red to indicate to the user that there is something they need to look at.

In Flow I used setErrorMessage but that does not seem to change anything about the way the component is displayed, or give to the user any indication of something wrong. Should I be looking at something different?


Have you tried the following?

field.setErrorMessage("The error text");

Hi Alejandro,
I’ll try that to see if I get a similar user experience in the UI and I’ll report back. Thanks!