Closed elatonsev closed 8 years ago
Off the top of my head, I'm not sure. If there is something we can do to make BufferedProxy behave better with the validations plugin, I'm happy to review a PR. Unfortunately, I don't have time to dig in deeper right now.
@elatonsev I had the same problem as you and found this cool addon: https://github.com/simplabs/ember-validated-form-buffer I hope it helps you.
@behnoodk Thanks for link, sounds interesting, I'll explore it. But anyway I forced it to work with this fix without any extensions.
I use BufferedProxy on my forms for buffering changes before save and want to use ember-cp-validations https://github.com/offirgolan/ember-cp-validations for validating them.
I can't use model validation, because values are setting to buffer first, so I trying to extend BufferedProxy object with Validations.
From their doc: "To lookup validators, container access is required which can cause an issue with Ember.Object creation if the object is statically imported."
So I need to pass a container as first parameter.
It works well with normal ObjectProxy
let UserBuffer = Ember.ObjectProxy.extend(Validations);
but don't with BufferedProxy
let UserBuffer = BufferedProxy.extend(Validations);
Guys from ember-cp-validations advised me to ask you https://github.com/offirgolan/ember-cp-validations/issues/135