File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 177
177
Polymer . PaperInputBehavior
178
178
] ,
179
179
180
+ properties : {
181
+ /*
182
+ * Errors that are exposed by validatable element.
183
+ * The error with the highest priority in this list will be shown when validatable is in error state, and no error-message is supplied.
184
+ */
185
+ errors : {
186
+ type : Array ,
187
+ value : function ( ) {
188
+ return [ ] ;
189
+ }
190
+ }
191
+ } ,
192
+
180
193
/**
181
194
* Makes sure only error messages with the highest priority are shown.
182
195
* @param {Object } item The error object to be filtered out.
183
- * @return {boolean } True if `value` has the highest priority.
196
+ * @return {boolean } whether the item should be shown based on priority
184
197
*/
185
198
_showHighestPrio : function ( item ) {
186
199
return item . priority < 1 ;
187
200
} ,
188
201
202
+ /**
203
+ * Determines whether error with highest priority from errors array needs to be shown.
204
+ * This error will be visible when property error-message is not supplied and the errors array is not empty.
205
+ * @param {Array } errors array
206
+ * @return {boolean } whether error with highest priority from errors array will be shown.
207
+ */
189
208
_showErrors : function ( errors ) {
190
209
return ! this . errorMessage && errors ;
191
210
}
You can’t perform that action at this time.
0 commit comments