-
Notifications
You must be signed in to change notification settings - Fork 77
Validation of inputs inside shadowRoot ? #218
Comments
I'm experiencing something similar, although my problem seems related nested components. I can get it to work with a custom element with an iron-input inside, but not nested custom components. |
I've debugged this issue and it seems that the entire
The check in findElements when the second parameter (ignoreNames) is true will always ignore custom elements:
I'd have marked this issue as critical; as working validation code using (edit) Add additional thoughts on fix in second comment above |
The lack of basic comments on open issues in this repo is incredible - 2+ months, multiple related issues, and not even a simple ack that it's being looked at, or rejected, or whatever.... |
I unfortunately kinda want to agree with @jstclair ....hello? Everyone busy on Polymer 3 or something? |
Hiya! Yup, this is a bug, but there isn't a PR for it to fix it, and I have not had a chance to look at it. |
Hi Notwaldorf, Here is a simplified version of what I was trying to explain in that issue :
If you click on the 'validate' Button, the form is considered as valid, even if the paper-input nested in the component 'my-cell' is not valid. I know about the iron-validatable-behavior which I could (should?) implement in my-cell component and add a validate() method that will be called by the iron-form when calling it's own validate method. |
Description
It seems that the iron-form components no longer validate inputs inside shadow DOM.
I have a custom component with and iron-form element, which includes some other custom components that have some inputs (paper-input, paper-radio-group, native inputs...) nested in dom-if templates.
The validation of the iron-form was working great with Polymer 1.9 when calling the validate() method,
but after migrated to Polymer2.0 the method returns always true because it seems unable to find and validate inputs inside the custom components.
Maybe the _findElements method could also find nodes inside Polymer.dom(parent.shadowRoot) ?
Or am I doing something wrong somewhere ? Thanks for your help
Expected outcome
The component should find all the validatable elements in shadowDom too.
Actual outcome
The validate() method always return true because it can't find inputs in shadow Dom.
Browsers Affected
The text was updated successfully, but these errors were encountered: