paper-input-decorator auto-validate adding "invalid" class onload

56 views
Skip to first unread message

da...@artscience.ca

unread,
Jun 16, 2015, 11:42:20 AM6/16/15
to polym...@googlegroups.com
Hi All:

I am trying to use the autoValidate property on the paper-input-decorator elements.
Even in the demo page, at :
paper-input/demo.html
I am seeing a bug when the page loads the "invalid" class is being added to the paper-input-decorator element instead of triggering when a user exits the field.  Therefore the error styling shows when the page loads.
Does anyone know how to make this work where its not being validated until the user exits the field?

 <paper-input-decorator label="Number" floatingLabel error="input is required!" autoValidate>
                         <input is="core-input" pattern="[0-9]">
</paper-input-decorator>

Thanks,
David




Robert Simon

unread,
Jun 17, 2015, 8:52:27 AM6/17/15
to polym...@googlegroups.com, da...@artscience.ca
Hello,

Seems that you want to disable autovalidation and trigger it manually on onBlur event same way as "validate" button was doing it in example ?

David Pell

unread,
Jun 17, 2015, 9:10:24 AM6/17/15
to Robert Simon, polym...@googlegroups.com
Yes I wanted to use autoValidate to handle inline onblur validation.

Reply all
Reply to author
Forward
0 new messages