vue-multiselect
vue-multiselect copied to clipboard
Is it possible to give :class when validation error ?
Is it possible to give like
:class="{ 'border-red-500': errors.start_date, }" so it's border will change to red when there is validation error?
Btw, I use tailwindcss
Good idea, however validation is normally controlled by the parent, or other components, as the multi-select won't know what is valid, and what is not. However, having an error state for when the user has manually inputted something that isn't an option, I see benefits in that.
Thanks you. What I meant was may you can give class border red that can be activated via parameter maybe if $condition == true then it will have red border