The onSubmit event is not really suitable for doing validation steps, as if you've set the form to be not be submittable, it will no longer be called. For field validation, it's much better to use the onValidate event handler instead. This event handler will be called every time the form is validated, which will still occur if the form is not submittable.
So for a simple validator that prevents form submission:
form.getVals(); //do whatever you want here with the form.