Form Validation working weirdly

Hi there, I make this validation but when I play with it by changing the inputs, it is performing weirdly, I tried to find the problem but could not, could anyone please help me to find out what the actual problem is?

Please see the video, after changing the name multiple times it is acccepting the wrong input and letting the action file open.

https://codepen.io/hamzacodepen951/pen/xxedjzJ
Was this page helpful?