Hi Nes,
Instead of alert function, you can use a text widget function.
For example if your text input widget had ID of id_mytext, then you can do something like
id_mytext.setText("the something is wrong");
Use this instead of the alert, and your error message should appear there.
You can do something similar with HTML widget, which allows you to add colors and formatting via HTML tags.
Best regards,
Taka