I don´t really see what the problem is, if your onsubmit
action returns false
in case of a non (javascript) validated form, the form simply doesn´t get submitted if javascript is enabled.
As soon as the form gets submitted, the php can do whatever it wants, validate, return errors, etc.