Form like validation errors on screen without form

Hi,
I want to display form like validation failure messages without actually a form and also without setting required error on the field. Is there an easy way to do that manually based on some logic? I don’t want to use window notifications.

Appreciate the help!

Regards,
Vkant

Sure. When you validate a component with validate(), failure results in an exception which you can catch and display in a Label component, for example.

If you use setRequired(true), the field will throw EmptyValueException if it is empty when validating. You can catch it and handle as you like, without setting the error message with setRequiredError().