From this, you would probably know the answer to the initial question already, surely, we want the validation to be triggered on submitting the form, regardless whether a button is clicked or not. In reality, if you add the validation in a ‘onclick’ event, the validation will be returned only when that button is clicked, [...]
Read the rest of this entry »