From 74623790c9f5c438f21269d24dc4bb245d21ccd2 Mon Sep 17 00:00:00 2001 From: Cassio Luis Felippe Date: Wed, 22 Mar 2017 15:59:04 -0300 Subject: [PATCH 1/2] Removed unknownProperty --- addon/errors.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addon/errors.js b/addon/errors.js index f5ee250d..74db38be 100644 --- a/addon/errors.js +++ b/addon/errors.js @@ -8,8 +8,8 @@ const { } = Ember; export default EmberObject.extend({ - unknownProperty(property) { - set(this, property, emberArray()); - return get(this, property); - } +// unknownProperty(property) { +// set(this, property, emberArray()); +// return get(this, property); +// } }); From f70559dfa209a696f5727b021d5d3adca321888c Mon Sep 17 00:00:00 2001 From: Cassio Luis Felippe Date: Wed, 22 Mar 2017 16:01:00 -0300 Subject: [PATCH 2/2] Created property if not exist --- addon/mixin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addon/mixin.js b/addon/mixin.js index 2fa174f2..4367e189 100644 --- a/addon/mixin.js +++ b/addon/mixin.js @@ -131,6 +131,11 @@ export default Mixin.create(setValidityMixin, { }); }); + let errors = this.errors; + Object.keys(this.validations).forEach(function(property) { + set(errors, property, emberArray()); + }); + this._validate(); },