contributte / live-form-validation

:no_entry: Nice client-side live form validation for Nette Forms.
https://contributte.org/packages/contributte/live-form-validation.html
BSD 3-Clause "New" or "Revised" License
59 stars 24 forks source link

Failed to execute 'insertBefore' on 'Node' #48

Open silviustan opened 6 years ago

silviustan commented 6 years ago

Hi,

I get this error on a regular bootstrap 3 form, Nette 2.4. Every field is wrapped by form-group, nothing special...

Everything happens on this line(306): parentEl.insertBefore(messageEl, el.nextSibling);

live-form-validation.js:306 Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at Object.LiveForm.getMessageElement (admin/assets/js/live-form-validation.js:306:13)
    at Object.LiveForm.processServerErrors (admin/assets/js/live-form-validation.js:145:23)
    at Object.Nette.initForm (admin/assets/js/live-form-validation.js:1151:12)
    at HTMLDocument.<anonymous> (admin/assets/js/live-form-validation.js:1165:12)

Anybody else? Do you have some suggestions how to fix it?

marysmech commented 5 years ago

I have exactly same problem after update to Nette 2.4.

kopecmi8 commented 5 years ago

Hi guys I just make a fix in this pull request: https://github.com/contributte/live-form-validation/pull/51