private function parseRule($rule, $input, $key)
    {
        $ruleExp = explode(':', $rule);
        if (count($ruleExp) > 1) {
            switch ($ruleExp[0]) {
                case 'match':
                $this->_errors[$key][] = $this->_parser->match($input, $key, $ruleExp[1], $this->_lang['match']);
                break;
                case 'min':
                $this->_errors[$key][] = $this->_parser->min($input, $key, $ruleExp[1], $this->_lang['min']);
                break;
                case 'max':
                $this->_errors[$key][] = $this->_parser->max($input, $key, $ruleExp[1], $this->_lang['max']);
                break;
                case 'from':
                $this->_errors[$key][] = $this->_parser->from($input, $key, $rule, $this->_lang['from']);
                break;
            }
        } else {
            switch ($rule) {
                case 'required':
                $this->_errors[$key][] = $this->_parser->required($input, $key, $this->_lang['required']);
                break;
                case 'email':
                $this->_errors[$key][] = $this->_parser->email($input, $key, $this->_lang['email']);
                break;
                case 'url':
                $this->_errors[$key][] = $this->_parser->url($input, $key, $this->_lang['url']);
                break;
            }
        }
    }
private function parseRule($rule, $input, $key)
    {
        $ruleExp = explode(':', $rule);
        if (count($ruleExp) > 1) {
            switch ($ruleExp[0]) {
                case 'match':
                $this->_errors[$key][] = $this->_parser->match($input, $key, $ruleExp[1], $this->_lang['match']);
                break;
                case 'min':
                $this->_errors[$key][] = $this->_parser->min($input, $key, $ruleExp[1], $this->_lang['min']);
                break;
                case 'max':
                $this->_errors[$key][] = $this->_parser->max($input, $key, $ruleExp[1], $this->_lang['max']);
                break;
                case 'from':
                $this->_errors[$key][] = $this->_parser->from($input, $key, $rule, $this->_lang['from']);
                break;
            }
        } else {
            switch ($rule) {
                case 'required':
                $this->_errors[$key][] = $this->_parser->required($input, $key, $this->_lang['required']);
                break;
                case 'email':
                $this->_errors[$key][] = $this->_parser->email($input, $key, $this->_lang['email']);
                break;
                case 'url':
                $this->_errors[$key][] = $this->_parser->url($input, $key, $this->_lang['url']);
                break;
            }
        }
    }
private function parseRule ( $ rule , $ input , $ key ) { $ ruleExp = explode ( ':' , $ rule ) ; if ( count ( $ ruleExp ) > 1 ) { switch ( $ ruleExp [ 0 ] ) { case 'match' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> match ( $ input , $ key , $ ruleExp [ 1 ] , $ this -> _lang [ 'match' ] ) ; break ; case 'min' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> min ( $ input , $ key , $ ruleExp [ 1 ] , $ this -> _lang [ 'min' ] ) ; break ; case 'max' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> max ( $ input , $ key , $ ruleExp [ 1 ] , $ this -> _lang [ 'max' ] ) ; break ; case 'from' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> from ( $ input , $ key , $ rule , $ this -> _lang [ 'from' ] ) ; break ; } } else { switch ( $ rule ) { case 'required' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> required ( $ input , $ key , $ this -> _lang [ 'required' ] ) ; break ; case 'email' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> email ( $ input , $ key , $ this -> _lang [ 'email' ] ) ; break ; case 'url' : $ this -> _errors [ $ key ] [ ] = $ this -> _parser -> url ( $ input , $ key , $ this -> _lang [ 'url' ] ) ; break ; } } }
Parses a given rule with the given input.

@param string $rule  - The rule being parsed
@param array  $input - Form input array
@param string $key   - Validation option
Parses a given rule with the given input .