-
Notifications
You must be signed in to change notification settings - Fork 44
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
getErrorLocation #46
Comments
Sorry, but there is no |
Now when there is no sibling and i want to |
Please provide a reduced test case. |
Hey, Have a look: It doesn't create an error if there is some sibling, it works fine when there is a text node. |
Nice find! I need to create an empty text node after the element if there isn't a sibling, it would seem. I'll add this to // If the message should come after the field
if (settings.messageAfterField) {
// If there's no next sibling, create one
if (!target.nextSibling) {
target.parentNode.appendChild(document.createTextNode(''));
}
return target.nextSibling;
} |
Fixed in v1.4.6 |
Great, thank you. |
Hey,
This code here is problematic.
Why?
What if a field doesn't have a sibling?
I have just one field in a container and that's all and so because of that I get error because there is no sibling.
and than you use
field.parentNode.insertBefore(error, location);
and it should be like selecting
insertBefore
orinsertAfter
Best,
Tom
The text was updated successfully, but these errors were encountered: