Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does findRealChildElement have a proper behaviour? #135

Open
giovannialbero1992 opened this issue Nov 7, 2017 · 1 comment
Open

Does findRealChildElement have a proper behaviour? #135

giovannialbero1992 opened this issue Nov 7, 2017 · 1 comment

Comments

@giovannialbero1992
Copy link

I add all models in page (also for forms that i've not included in page).
So i've observed that if a single child of form match js model validation, the js validation is attached to entire form.
Should not it be more correct that all child elements match form elements?

Now:

           for (var childName in element.children) {
                child = element.children[childName].domNode;
                if (child) {
                    break;
                }
            }

Suggest:

           for (var childName in element.children) {
                child = element.children[childName].domNode;
                if (! child) {
                    return null;
                }
            }

I hope I have been able to explain. I can apply a PR on this if my suggest is correct.

@giovannialbero1992
Copy link
Author

giovannialbero1992 commented Nov 7, 2017

I add that I've a conflict name in my case so there is an input field with same name of another js form validator model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant