Skip to content

Commit

Permalink
Can no longer submit forms with enter if they are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Tivoli committed Sep 1, 2011
1 parent ac1cc20 commit 3df6874
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jquery.attest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/jquery.attest.coffee
Expand Up @@ -18,6 +18,8 @@ class attest
@fields = @form.find(@options.nodes).not(@options.ignored)
@submit = @form.find(@options.submit)
@_bindings()
@form.bind 'keypress', (e) =>
return false if e.which is 13 and @validate.length isnt 0

_bindings: ->
@fields.each (idx, el) =>
Expand Down

0 comments on commit 3df6874

Please sign in to comment.