dart-archive / core-elements

Polymer core-* elements wrapped or ported for Dart
https://pub.dartlang.org/packages/core_elements
Apache License 2.0
33 stars 25 forks source link

paper-input-decorator not updating validity as you type #178

Open Andersmholmgren opened 9 years ago

Andersmholmgren commented 9 years ago

According to the doco it appears that validity should be updated as you type. The following example only updates validity once the field loses focus

      <paper-input-decorator id="usernameDec" label="Username"
          error="Must enter a username!"
          isInvalid="{{!$['username'].validity.valid}}" floatingLabel flex>
        <input id="username" is="core-input"
          value="{{username}}"
          required autofocus>
      </paper-input-decorator>
jakemac53 commented 9 years ago

It looks like this is a result of having the "floatingLabel" attribute, if you remove that then it works as intended. Filed a bug on the js repo, https://github.com/Polymer/paper-input/issues/135.