Closed igorazevedo closed 7 years ago
paper-input
already has an errorMessage
property for this (it creates a <paper-input-error>
element and distributes it to the paper-input-container
)
I'm aware of that, however using a <paper-input-error>
element in the add-on
slot instead of the errorMessage
attribute makes it easier when working with server-side validation as you can use dom-repeat
and dom-if
to deal with response data.
If you want to use it explicitly, I recommend using paper-input-container
itself. paper-input
is supposed to be the easy, straight forward path, and this change would go against that paradigm
Closing, as this is not a feature that we should add to paper-input
, and there's already alternatives to do this
I'm wondering if it would be benefitial to add a "add-on" slot to passthrough the internal paper-input-container slot of the same name.
This would allow declaring error messages or descriptions directly in the paper-input element.