powmedia / backbone-forms

Form framework for BackboneJS with nested forms, editable lists and validation
MIT License
2.17k stars 415 forks source link

$ not declared in Form.validators #519

Closed wunderdojo closed 8 years ago

wunderdojo commented 8 years ago

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.