judgegem / judge

Client-side form validation for Rails
MIT License
256 stars 41 forks source link

Validates length with allow_blank not validating if input is blank #26

Closed tommyalvarez closed 10 years ago

tommyalvarez commented 10 years ago

For validations like so:

validates :title, length: {in: 3..200}, allow_blank: true

When validating inputs like this: judge.validate(input, validHandler, invalidHandler), if the input is left empty, none of the handlers are called. The validHandler should be called in order to be able to clean up the input. Is there any workaround?

joecorcoran commented 10 years ago

Closing, let's continue discussion on #27.