Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to give :class when validation error ? #1670

Open
jonathanoeijoeng opened this issue Feb 28, 2023 · 2 comments
Open

Is it possible to give :class when validation error ? #1670

jonathanoeijoeng opened this issue Feb 28, 2023 · 2 comments

Comments

@jonathanoeijoeng
Copy link

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

@mattelen
Copy link
Collaborator

mattelen commented Mar 3, 2023

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.

@jonathanoeijoeng
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants