vue-multiselect icon indicating copy to clipboard operation
vue-multiselect copied to clipboard

Is it possible to give :class when validation error ?

Open jonathanoeijoeng opened this issue 2 years ago • 2 comments

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

jonathanoeijoeng avatar Feb 28 '23 02:02 jonathanoeijoeng

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.

mattelen avatar Mar 03 '23 16:03 mattelen

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

jonathanoeijoeng avatar Mar 04 '23 02:03 jonathanoeijoeng