So I was playing about with Livewire, and having a go at validations. While experimenting, I learned how to display error messages and submit the form successfully. However, when I tried changing the border colours to correspond with the errors, the form crashed and would not reset
In this example, we're using the class directive to conditionally add the border-red-500 class to the input field when there's a validation error on the name field. This will add a red border to the input field. We're also using the @error directive to display the validation error message below the input field.
Note that we're using the text-red-500 class to style the error message. You can adjust the classes to match your preferred styling.
There are pretty much few options but if you want to work alongside back-end validation and front-end result. I can suggest you this (Design perspective depend on yours, it is mine)