Saw this funny behavior a few days ago, where a button will run away from the cursor if the form is invalid and tried to do something similar with CSS and a little JavaScript.
In this code I use transitions and transforms. I also use the "checkValidity" method to get the validation status with JavaScript.