iron-form icon indicating copy to clipboard operation
iron-form copied to clipboard

Reset validation

Open slavko-ptitsyn opened this issue 10 years ago • 11 comments

After form.reset() function call, input field is cleared, but validation message is still being displayed. main Is it possible to add validation messages clearing to 'reset' function or add a separate function?

slavko-ptitsyn avatar Dec 23 '15 19:12 slavko-ptitsyn

@slavko-ptitsyn Yup, you're totally right! A line in here (https://github.com/PolymerElements/iron-form/blob/master/iron-form.html#L408) probably needs to be added to call el.validate() or something like that. Let me know if you want to submit a PR for this, or if I should take a look!

notwaldorf avatar Jan 22 '16 07:01 notwaldorf

@notwaldorf I created PR with solution for this issue

slavko-ptitsyn avatar Jan 25 '16 17:01 slavko-ptitsyn

@notwaldorf Can you create a new release with that fixes?

slavko-ptitsyn avatar Feb 02 '16 09:02 slavko-ptitsyn

Done!

notwaldorf avatar Feb 04 '16 20:02 notwaldorf

This issue appears again in Polymer 2

roxanalascu avatar Apr 08 '17 10:04 roxanalascu

@Roxy94 -- form reset is not yet implemented for the 2.0 version of iron-form

notwaldorf avatar Apr 08 '17 10:04 notwaldorf

Could you please reopen the issue?

jhrdina avatar Aug 22 '17 08:08 jhrdina

I'd like to add that floating labels don't come down either upon reset (seems related, polymer 2)

pdesjardins90 avatar Aug 23 '17 17:08 pdesjardins90

Unfortunately, I couldn't reproduce the floating labels issue. Could you please try to create a small demo?

jhrdina avatar Aug 27 '17 09:08 jhrdina

In Polymer 2 reset also doesn't reset char counters. Should I create a new issue for this?

aronfiechter avatar Nov 23 '17 13:11 aronfiechter

Closing, since this is a super old issue and resetting works v differently on Polymer 2/3

notwaldorf avatar Aug 24 '18 17:08 notwaldorf