lcoq / ember-validations

Ember-Validations - An Ember.js library for handling object validations
MIT License
122 stars 25 forks source link

Allow defining validations at runtime #28

Open lukegalea opened 11 years ago

lukegalea commented 11 years ago

We'd like to define validations dynamically.. something like this:

 validations: (->    
     if @get 'required'
       value:
          presence: true
 ).property 'required'

But if validations is defined as a computed property it's always empty (overridden by mixin somehow??)