JsFormValidatorBundle
JsFormValidatorBundle copied to clipboard
Does `findRealChildElement` have a proper behaviour?
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.
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.