Live disable Submit Buttons working wrong

Currently it enables the form if the last validated field is Ok. So in the form with two fields if first is Invalid and the second is Valid and were edited last - submit button will be enabled. This is wrong. I fixed to check the whole form validity to enable the Submit button and it's working for me.