Skip to content

Commit

Permalink
Validation Messages fix (#536)
Browse files Browse the repository at this point in the history
* validation for autocomplete and change to form

* changed validation property logic for paper-autocomplete

* validation messages fix
  • Loading branch information
ibarrick authored and miguelcobain committed Oct 31, 2016
1 parent d17d1ff commit 4214ba0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion addon/mixins/validation-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
}
},

/**
Expand Down
3 changes: 1 addition & 2 deletions app/templates/components/paper-autocomplete-trigger.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions app/templates/components/paper-autocomplete.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4214ba0

Please sign in to comment.