How to get rid of error messages after second try where file was uploaded successfully? My question is similar to:

https://stackoverflow.com/questions/9676988/in-drupal-7-errors-for-file-managed-field-remain-even-when-fixed

Why error message from my custom file validator remains the same after next try where was file uploaded  successfully ?

How can I solve this problem?

I didn't find any JS handler which I can extend.
There is a working patch for this issue here. (File validation error message not removed after subsequent upload of valid file - 1792032)

That patch issue is waiting on someone to write tests before it can be RTBCd. It shouldn't be hard to adapt that patch to Drupal 7 in the mean time. Just make sure you document the fact that you have patched/modified core somewhere for future developers.