bcardarella/client_side_validations — pull request #398 by wynst (2012-10-07 06:28:50+00:00)
Title: fix numericality js error 'Unexpected token >' when input blank

Hi Brian,

I can see that this issue has been adressed in master (in coffeescript version).

just a heads-up for people using the gem version, this is a hard-to-track error,

```ruby
validates :percentage,
numericality: {
greater_than: 0
}
```

if input that checks for numericality is blank, js fail with syntax-error 'Unexpected token >' , this is because `element.val()` returns empty string.

one can only see a slight js error in console before form gets submitted.

Thanks to this bug, I learned a delightful snippet when working with client_side_validations form:
``` coffeescript

$(document).on 'submit', 'form', (event) ->
event.preventDefault()
```