Replies: 1 comment
-
<template #message="{ message }">
<span v-html="message"></span>
</template> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know, your first question is, "Why don't you just use an error message?" Because I don't know how to get it to display html. :)
If a person has an error in a particular input field, I want to show an error message with a link for where to go to get help. My code looks something like this:
Because I want a clickable link in the error message, I need to use v-html to preserve the html tags (as far as I know). This almost works, except that the position of the message is different. There is space on the left of the message where an actual error message would appear. I can fix that with css, but it would be nice if I didn't have to.
It's also clunky because I had to duplicate the classes so the css for the error message, like the color, would be applied.
Any ideas of a better way to handle this?
Beta Was this translation helpful? Give feedback.
All reactions