src/Valitron/Validator.php
/**
     * Convenience method to add multiple validation rules with an array
     * @param array $rules
     */
Convenience method to add multiple validation rules with an array
@param array $rules
Convenience method to add multiple validation rules with an array @param array $rules
public function rules($rules)
    {
        foreach ($rules as $ruleType => $params) {
            if (is_array($params)) {
                foreach ($params as $innerParams) {
                    array_unshift($innerParams, $ruleType);
                    call_user_func_array(array($this, "rule"), $innerParams);
                }
            } else {
                $this->rule($ruleType, $params);
            }
        }
    }
public function rules ( $ rules ) { foreach ( $ rules as $ ruleType => $ params ) { if ( is_array ( $ params ) ) { foreach ( $ params as $ innerParams ) { array_unshift ( $ innerParams , $ ruleType ) ; call_user_func_array ( array ( $ this , " rule " ) , $ innerParams ) ; } } else { $ this -> rule ( $ ruleType , $ params ) ; } } }
Convenience method to add multiple validation rules with an array
 @param array $rules
Convenience method to add multiple validation rules with an array @param array $rules