var mongoose = require('mongoose');
var Schema = mongoose.Schema;
mongoose.connect('localhost');
var A = new Schema({str: String});
var B = new Schema({a: [A]});
B.path('a').validate(function(val, next) {
console.log('val', val);
next();
});
var b = mongoose.model('b', B);
var p = new b;
p.a.push({str: 'asdf'});
p.save();
If you run this code, you'll see that the validator is called twice. Once with the entire array as val, and once for each element in the array.
I'm not sure which one is the intended behavior (it used to just run on the whole array), but it certainly shouldn't be both.