kohana / minion

Everyone loves having a minion they can boss around
113 stars 76 forks source link

Add auto validation #43

Closed zeelot closed 13 years ago

zeelot commented 13 years ago

Going to be adding this:

protected $_errors_file = 'validation';

public function build_validation(Validation $validation)
{
    return parent::build_validation($validation)
        ->rule('param_name', 'not_empty')
        ->rule('other_param', 'digit');
}

Minion will automatically run the validation on the CLI parameters based on your rules and output the errors if there are any.

Related to #39 as I am splitting that ticket up.