I have two submit type buttons on my form and only one of them has #element_validate defined. When the button that has this defined is clicked on the validation function it is set to is called as expected. What I did not expect is this validation function is also called when the button that doesn't have #element_validate defined is clicked on. So to keep the code in the validation function from executing when not expected I had to use an if statement to detect when the right button for that validation code has been clicked on.
Should this be happening? If so what is the point of having the #element_validate array element for individual submit buttons?
The submit button that does not have #element_validate defined does not need validation for its data.