rem: i += (is_found) ? 2 : 1; 
add: if (is_found) i++; 
context: function vob_check_conditional (form, ifs, N_level, ifs_match) {  if (! N_level) N_level = 0;  N_level ++;  /// can pass a single hash - or an array ref of hashes  if (! ifs) {    return this.error("Need reference passed to check_conditional");  } else if (typeof(ifs) != 'object') {    ifs = new Array(ifs);  } else if (! ifs.length) { // turn hash into array of hash    ifs = new Array(ifs);  }  /// run the if options here  /// multiple items can be passed - all are required unless OR is used to separate  var is_found = 1;  var m;  for (var i = 0; i < ifs.length; i ++) {    var ref = ifs[i];    if (typeof(ref) != 'object') {      if (ref == 'OR') {        i += (is_found) ? 2 : 1;        is_found = 1;        continue;      } else {        var field = ref;        ref = new Array();        if (m = field.match('^(\\s*!\\s*)')) {          field = field.substring(m[1].length);          ref['max_in_set'] = '0 of ' + field;        } else {          ref['required'] = 1;        }        ref['field'] = field;      }    }    if (! is_found) break;    /// get the field - allow for custom variables based upon a match    var field = ref['field'];    if (! field) return this.error("Missing field key during validate_if");    field = field.replace(new RegExp('\\$(\\d+)','g'), function (all, N) {      if (typeof(ifs_match) != 'object'          || typeof(ifs_match[N]) == 'undefined') return ''      return ifs_match[N];    });    var err = this.validate_buddy(form, field, ref, N_level);    if (err.length) is_found = 0;  }  return is_found;}
meta: 5443	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5443/5a8cf4dc4af49bd5e7bbfeb162f198028d1fb87f/validate.js/clean/lib/CGI/Ex/validate.js