powmedia/backbone-forms

$ not declared in Form.validators

wunderdojo opened this issue · 0 comments

First, thanks a ton for this. Implemented in a project and after a day of getting the hang of it I've been able to extend and use to handle tons of stuff that I would have spent forever coding myself.

I was using validate required on some fields and getting the following:
Uncaught Type Error: Cannot read property 'trim' of undefined

It may be just an issue with the way I'm using it (extending Backbone.Form and adding some custom methods and defaults). Fix for me was adding $ = Backbone.$ at line 511 in the Form.validators object. jQuery wasn't aliased otherwise.