I have created an input field where the user can enter their email address.
input(
:class="hasError? 'border-red-600': 'border-green-700'"
id="email"
v-model="email"
type="email"
name="email"
placeholder="type your email"
required
)
When there's an error, the hasError variable is set to true.
Is there a way to implement a v-bind or method that will revert the class back to 'border-green-700' when the user starts deleting the incorrect email? What would be the best approach for this situation?