| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 (function() { | 3 (function() { |
| 4 | 4 |
| 5 Polymer({ | 5 Polymer({ |
| 6 | 6 |
| 7 is: 'paper-input-error', | 7 is: 'paper-input-error', |
| 8 | 8 |
| 9 enableCustomStyleProperties: true, | 9 behaviors: [ |
| 10 Polymer.PaperInputAddonBehavior |
| 11 ], |
| 10 | 12 |
| 11 hostAttributes: { | 13 hostAttributes: { |
| 12 'add-on': '', | |
| 13 'role': 'alert' | 14 'role': 'alert' |
| 14 }, | 15 }, |
| 15 | 16 |
| 16 properties: { | 17 properties: { |
| 17 | 18 |
| 18 /** | 19 /** |
| 19 * Set to true to show the error. | 20 * True if the error is showing. |
| 20 */ | 21 */ |
| 21 invalid: { | 22 invalid: { |
| 23 readOnly: true, |
| 22 reflectToAttribute: true, | 24 reflectToAttribute: true, |
| 23 type: Boolean | 25 type: Boolean |
| 24 } | 26 } |
| 25 | 27 |
| 26 }, | 28 }, |
| 27 | 29 |
| 28 attached: function() { | 30 update: function(state) { |
| 29 this.fire('addon-attached'); | 31 this._setInvalid(state.invalid); |
| 30 } | 32 } |
| 31 | 33 |
| 32 }) | 34 }) |
| 33 | 35 |
| 34 })(); | 36 })(); |
| 35 | 37 |
| OLD | NEW |