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

Nested form validation problem #69

Open
emr opened this issue Feb 13, 2020 · 0 comments
Open

Nested form validation problem #69

emr opened this issue Feb 13, 2020 · 0 comments

Comments

@emr
Copy link
Contributor

emr commented Feb 13, 2020

<div class="form-group">
  <div role="radiogroup">
    <label>
      <input type="radio" name="group" value="1" data-validetta="required" data-vd-parent-up="2" />
      Group value 1
    </label>
    <label>
      <input type="radio" name="group" value="2" data-validetta="required" data-vd-parent-up="2" />
      Group value 2
    </label>
  </div>
  <div class="form-group group-1">
    <input data-validetta="required" \>
  </div>
</div>

Validetta is running on that form. When I submit the form, new markup looks like (as expected):

<div class="form-group">
  <div role="radiogroup">
    <label>
      <input type="radio" name="group" value="1" data-validetta="required" data-vd-parent-up="2" />
      Group value 1
    </label>
    <label>
      <input type="radio" name="group" value="2" data-validetta="required" data-vd-parent-up="2" />
      Group value 2
    </label>
  </div>
  <div class="form-group group-1">
    <input data-validetta="required" \>
+   <div class="error-message">This field is required. Please be sure to check.</div>
  </div>
+ <div class="error-message">This field is required. Please be sure to check.</div>
</div>

But when I submit the form second time, I getting this error on the browser console:

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
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