How about something like this:
And some similar option to influence message position.
Not only for errors but also for the regular notification.