Description
Hi,
I'm currently coding a freela and i've got this strange behavior... I don't have much time to explain, and it's an ecommerce project so i don't put code here.
Steps to reproduce:
1 - Create two required fields
2 - Set messages and all things you want.
3 - Start filing the second field and leave (it calls unhighlight and show the field is fine)
4 - Go back to second field and remove the content (it call highlight and show the error without leaving the field)
5 - Go to the first field, fill it and leave (calls unhighlight and show the field is fine)
6 - Go back to this and remove the content... it doesnt call the highlight method... i've been debugging the code and have noted the field doesnt is in this.submited array...
So even if you leave the field without content, it will never show de error. It will show error when you submit form, its the only way.
/* Solution (or workaround) */
in function element after this.showErrors() and before return i put this line:
if(!(element.name in this.submitted)) this.submitted[element.name] = "";
Maybe it's an workaround, but it worked for me and is the fastest way i can resolve this strange issue hehe