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

improvement: add callback ability for hideErrors, like showErrors. #1541

Open
dave-newson opened this issue Aug 3, 2015 · 2 comments
Open
Milestone

Comments

@dave-newson
Copy link

I've enhanced the validation error placement for compatibility with Symfony forms and Bootstrap 3, meaning some errors aren't actually attached to fields and get placed way outside of jquery-validates jurisdiction.

Using custom code in showErrors, errorPlacement and highlight/unhighlight this is perfectly possible. Unfortunately when I try to reset the form, jquery-validation can't find these errors, and nor can I add custom code to handle them myself.

If I can add code via the options for showErrors, why can't I do the same with hideErrors? The interface should be symmetric.

Side note: I can monkey-patch the functionality in, but it's a complete butchers.

@Arkni
Copy link
Member

Arkni commented Oct 14, 2015

Could you send a pull request in order to implement this feature.

As Jörn said:

Even better, make an attempt to fix the issue yourself, and improve the project by sending a pull request. This may seem daunting at first, but you'll likely learn some useful skills that you can apply elsewhere as well. And you can help keep this project alive. We've documented how to do these things, too. A patch is worth a thousand issues!

@staabm
Copy link
Member

staabm commented Oct 19, 2015

AFAIR we should not add another option/api to error show/hide mechanics.

This api requires a complete overhaul which requires breaking Bc (so jquery-validate 2.0).
I agree that a symetric api is a good suggestion though.

@staabm staabm added this to the 2.0.0 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants