code: function validationFailed(inst, v, cb) {
      var attr = v[0];
      var conf = v[1];
      var opts = v[2] || {};
  
      if (typeof attr !== 'string') return false;
  
      // here we should check skip validation conditions (if, unless)
      // that can be specified in conf
      if (skipValidation(inst, conf, 'if')) return false;
      if (skipValidation(inst, conf, 'unless')) return false;
  
      var fail = false;
      var validator = validators[conf.validation];
      var validatorArguments = [];
      validatorArguments.push(attr);
      validatorArguments.push(conf);
      validatorArguments.push(function onerror(kind) {
          var message;
          if (conf.message) {
              message = conf.message;
          }
          if (!message && defaultMessages[conf.validation]) {
              message = defaultMessages[conf.validation];
          }
          if (!message) {
              message = 'is invalid';
          }
          if (kind) {
              if (message[kind]) {
                  // get deeper
                  message = message[kind];
              } else if (defaultMessages.common[kind]) {
                  message = defaultMessages.common[kind];
              }
          }
          inst.errors.add(attr, message);
          fail = true;
          if (cb) {
              return cb && cb(fail);
          }
      });
      if (cb) {
          validatorArguments.push(function onsuccess() {
              return cb && cb(fail);
          });
      }
      validator.apply(inst, validatorArguments);
      return fail;
  }
docs: 43903 44471