Hi,
That would be quite complex to do as there is no mechanism implemented to handle that for all the different cases.
Also, on most websites the button is always displayed and the error happens after you click on it, so it seems more user friendly.
Hiding the button, I'm afraid you would have some users arriving on the page, not seeing the button, and then asking you why there is no button without even trying to fill everything.