lib/validator.js
function _getRule(attribute, rules) {
    rules = rules || [];

    if ( ! rules[attribute]) {
      return;
    }

    for(var i in rules[attribute]) {
      var value = rules[attribute][i];
      parsedRule = _parseRule(rule);

      if (in_array(parsedRule.rule, rules))
        return [parsedRule.rule, parsedRule.parameters];
    }
  }
function _getRule(attribute, rules) {
    rules = rules || [];

    if ( ! rules[attribute]) {
      return;
    }

    for(var i in rules[attribute]) {
      var value = rules[attribute][i];
      parsedRule = _parseRule(rule);

      if (in_array(parsedRule.rule, rules))
        return [parsedRule.rule, parsedRule.parameters];
    }
  }
function _getRule ( attribute , rules ) { rules = rules || [ ] ; if ( ! rules [ attribute ] ) { return ; } for ( var i in rules [ attribute ] ) { var value = rules [ attribute ] [ i ] ; parsedRule = _parseRule ( rule ) ; if ( in_array ( parsedRule . rule , rules ) ) return [ parsedRule . rule , parsedRule . parameters ] ; } }
get rule and parameters of a rules

@param {String}       attribute
@param {String|array} rules

@return {Array|null}
get rule and parameters of a rules