rickharrison/validate.js — pull request #51 by atonparker (2013-02-08 22:03:24+00:00)
Title: Fixes submit on error

Fixes issue #40. When the validation callback throws an error, the calling function breaks before calling `event.preventDefault()` but catches and suppresses the error in the `onSubmit` handler making the form submit for seemingly no reason. This pull request moves the `try...catch` so that an invalid form will not submit when the callback throws an error.