I was working on a code snippet with the following structure:
shakingErr
class from CSS was not being applied correctly when the user clicked submit with empty/wrong fields. How can this be resolved so that the shaking error animation is triggered properly?Additionally, there's another animation that plays on the button click. What changes can be made to only trigger this animation after all input fields are filled correctly?
Desired Outcome
To better understand the requirements, refer to the video demonstration at this link. The goal is to have the error animation activate when the user tries to submit empty/wrong fields, while ensuring that the button animation is only activated upon successful form completion.