Open stivaliserna opened 7 years ago
Using polymer 2, if I have a paper-input with some validation:
<paper-input value="{{x}}" auto-validate id="pass" minlength="12" required type="password"> </paper-input>
Works ok if users go and type into the input. Whoever, if I programatically change the input value, the validation is lost:
const input = element.shadowRoot.querySelector('#pass') input.value = 'too-short' input.validate() // => true
input.validate() should be false, because value is shorter than minlength.
input.validate()
false
value
minlength
input.validate() is true.
true
.validate()
Description
Using polymer 2, if I have a paper-input with some validation:
Works ok if users go and type into the input. Whoever, if I programatically change the input value, the validation is lost:
Expected outcome
input.validate()
should befalse
, becausevalue
is shorter thanminlength
.Actual outcome
input.validate()
istrue
.Steps to reproduce
minlength
attribute.validate()
Browsers Affected