paper-input icon indicating copy to clipboard operation
paper-input copied to clipboard

auto-validate not work in paper-textarea with custom validator

Open jtrs opened this issue 9 years ago • 3 comments

Description

The paper-textarea element not call the validator function like a paper-input element.

Expected outcome

Validator function for paper-textarea should be called.

Actual outcome

Validator function for paper-textarea don't call.

Live Demo

https://plnkr.co/edit/VtKvhY?p=preview

Steps to reproduce

  1. Type in Label_2 (paper-textarea) a chararacter
  2. It should be shown en error messege, but don't
  3. Type in Label_1 (paper-input) a chararacter
  4. The error message is visible

Browsers Affected

  • [x ] Chrome (Only tryed in Chrome)
  • [ ] Firefox
  • [ ] Safari 9
  • [ ] Safari 8
  • [ ] Safari 7
  • [ ] Edge
  • [ ] IE 11
  • [ ] IE 10

jtrs avatar Jul 29 '16 12:07 jtrs

Looks like a pretty frustrating bug when using custom validators.

The validator property on the input element doesn't get bound to the nested input element. A workaround involves reaching in and binding it together.

this.$['paper-textarea-instance'].$['input'].validator = this.$['paper-textarea-instance'].validator;

samuelli avatar Nov 30 '16 03:11 samuelli

I also ran into this. Is this by design or an oversight? The documentation specifically states:

Validation

Currently only required and maxlength validation is supported.

-- Yvonne Yip, May 25, 2015

I see that @jtrs tried to fix this themselves but the PR #450 failed CLA and the interest was dropped.

TimLuq avatar Dec 01 '16 12:12 TimLuq

Still running into this.

DomNomNom avatar Sep 18 '17 07:09 DomNomNom