Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Multiple inputs in one form group not setting validity state correctly #44

Closed
philippd opened this issue Oct 27, 2014 · 0 comments
Closed

Comments

@philippd
Copy link
Collaborator

If there are multiple valdr-validated inputs in one form group, the validity classes added on form group level (used to show and hide the validation messages via CSS) are not correct. The last validated input field sets the valdr-valid class and does not check if any other inputs in the same form group are still invalid at that time.

This issue is caused by the input directive in the valdr message module, which searches for it's parent form group element to add the validation message as it's last child and also set the validity states there.

A possible fix is to implement the form group as a new valdr directive, so we can conditionally require the form group from the valdr input directives and not have to do any "parent-dom-element-finding-magic" anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant