From 4214ba0c22800b92420dd72ae0a7c960cc088ba5 Mon Sep 17 00:00:00 2001 From: ibarrick Date: Mon, 31 Oct 2016 14:48:09 -0400 Subject: [PATCH] Validation Messages fix (#536) * validation for autocomplete and change to form * changed validation property logic for paper-autocomplete * validation messages fix --- addon/mixins/validation-mixin.js | 4 +++- app/templates/components/paper-autocomplete-trigger.hbs | 3 +-- app/templates/components/paper-autocomplete.hbs | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/mixins/validation-mixin.js b/addon/mixins/validation-mixin.js index 866c9bd23..68fcae3c2 100644 --- a/addon/mixins/validation-mixin.js +++ b/addon/mixins/validation-mixin.js @@ -72,7 +72,9 @@ export default Mixin.create({ init() { this._super(...arguments); assert('validationProperty must be set', this.get('validationProperty')); - this.set('validationErrorMessages', buildComputedValidationMessages(this.get('validationProperty'))); + if (!this.get('validationErrorMessages')) { + this.set('validationErrorMessages', buildComputedValidationMessages(this.get('validationProperty'))); + } }, /** diff --git a/app/templates/components/paper-autocomplete-trigger.hbs b/app/templates/components/paper-autocomplete-trigger.hbs index 65d5a206a..0163c5528 100644 --- a/app/templates/components/paper-autocomplete-trigger.hbs +++ b/app/templates/components/paper-autocomplete-trigger.hbs @@ -3,8 +3,7 @@ label=extra.label value=text flex=true - required=required - customValidations=customValidations + validationErrorMessages=(readonly validationErrorMessages) disabled=(readonly disabled) onChange=(action "handleInputLocal") onFocus=(action onFocus) diff --git a/app/templates/components/paper-autocomplete.hbs b/app/templates/components/paper-autocomplete.hbs index 9356e1a84..ee2819378 100644 --- a/app/templates/components/paper-autocomplete.hbs +++ b/app/templates/components/paper-autocomplete.hbs @@ -41,8 +41,7 @@ searchEnabled=(readonly searchEnabled) searchField=(readonly searchField) searchText=(readonly searchText) - required=(readonly required) - customValidations=(readonly customValidations) + validationErrorMessages=(readonly validationErrorMessages) select=(readonly publicAPI) selected=(readonly selected) selectedItemComponent=(readonly selectedItemComponent)