Skip to content

Instantly share code, notes, and snippets.

@azwahlen
Last active December 16, 2015 00:09
Show Gist options
  • Save azwahlen/5345433 to your computer and use it in GitHub Desktop.
Save azwahlen/5345433 to your computer and use it in GitHub Desktop.
Afin d'éviter les pertes de temps et d'énergie : lorsque l'on utilise jQuery validation, les champs hidden sont ignorés. Pour y remédier (ci-dessous, le cas particulier de "chosen.js"), ajouter une classe à votre champ et copier-coller le code ci-dessous, dans un script global, en remplaçant le ."chzn-done" par la classe ajoutée à votre champ de…
$('form').each(function() {
var validator = $(this).data("validator");
if (validator) {
validator.settings.ignore += ":not(.chzn-done)";
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment