Skip to content

Commit

Permalink
Update Formo to track another patch (http://github.com/bmidget/kohana…
Browse files Browse the repository at this point in the history
  • Loading branch information
shadlaws committed Apr 28, 2013
1 parent f05de4b commit be5a94a
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions modules/formo/classes/Formo/Core/Formo.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,27 @@ public function add_class($class)
* Add a single rule
*
* @access public
* @param mixed $alias
* @param array $rule (default: NULL)
* @param mixed $rule (as array like Validation::rules() or string like Validation::rule())
* @param array $params (only used if $rule isn't an array, default: NULL)
* @return Formo obj
*/
public function add_rule( array $array)
public function add_rule($rule, $params = NULL)
{
$this->_add_rule($array);
if (is_array($rule))
{
$this->_add_rule($rule);
}
else
{
if (isset($params))
{
$this->_add_rule(array($rule, $params));
}
else
{
$this->_add_rule(array($rule));
}
}

return $this;
}
Expand Down

0 comments on commit be5a94a

Please sign in to comment.