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

errorWrapper and errorClass appended to different location when using custom validator #711

Closed
ghost opened this issue Aug 15, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 15, 2014

When using a custom validator the errorWrapper and errorClass are appended to a different element than they are when using a default validator.

Default:
.parsley-errors-list appended as sibling of validated element
.parsley-error is added to validated element
Custom:
.parsley-errors-list appended as sibling of validated element's parent
.parsley-error is added to validated element's parent

See jsfiddle: http://jsfiddle.net/kdaigneault/1ykk4q0x/16/

(Parsley v2.0.3)

@marcandre
Copy link
Collaborator

First of all, thank you for your fiddle.

This is actually the perfect example of why every bug should be reported with a fiddle! Without is, I would not have believed you...

The issue is that your validator is called multiple. That conflicts with the existing multiple option of Parsley... Rename it to something else and you will be good to go.

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