Skip to content

Does findRealChildElement have a proper behaviour? #135

@giovannialbero1992

Description

@giovannialbero1992

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions