zurb/foundation — pull request #5359 by nicmendoza (2014-06-23 18:08:41+00:00)
Title: Allow elements with custom validators to still validate against standard validation

Now you can set up an element like this:

and have it run the custom validator while ALSO checking if it's a valid email address, rather than needing to re-implement email validation internal to your custom validator. I think that if you are going to use html5 input types, you don't want the validation to go away just because you are implementing a custom validator.

I had to modify one test to support the fact that form submissions would trigger all custom validators, so the number of errors was 3 instead of 1. Could possibly include the following (foundation.abide.js:191) to make the errors less chatty:

if (validator && value) {
valid = this.settings.validators[validator].apply(this, [el, required, parent]);
validations.push(valid);
}