PolymerElements / iron-form

Custom form element
https://www.webcomponents.org/element/PolymerElements/iron-form
63 stars 81 forks source link

Align reset with validate #257

Closed 200Puls closed 6 years ago

200Puls commented 6 years ago

Description

When validate is executed the name of the elements is ignored. So even elements without a name are validated and marked invalid.

When reset is called after a validate only those elements which have a name set are reset back to a valid state.

Expected outcome

This should be handled in a consistent way so that validate, reset and _saveInitialValues use _getValidatableElements and ignore the name. This would ensure that these methods all affect the same elements.

Actual outcome

Live Demo

https://jsbin.com/linetarexa/1/edit?html,console,output

Steps to reproduce

notwaldorf commented 6 years ago

This looks consistent with the native form too: http://jsbin.com/sorohes/edit?html,output