private function validateInput($input, $rules, $key)
    {
        if (isset($input[$key]) && isset($rules[$key])) {
            $ruleExp = explode('|', $rules[$key]);

            foreach ($ruleExp as $rule) {
                $this->parseRule($rule, $input, $key);
            }
        }
    }
private function validateInput($input, $rules, $key)
    {
        if (isset($input[$key]) && isset($rules[$key])) {
            $ruleExp = explode('|', $rules[$key]);

            foreach ($ruleExp as $rule) {
                $this->parseRule($rule, $input, $key);
            }
        }
    }
private function validateInput ( $ input , $ rules , $ key ) { if ( isset ( $ input [ $ key ] ) && isset ( $ rules [ $ key ] ) ) { $ ruleExp = explode ( '|' , $ rules [ $ key ] ) ; foreach ( $ ruleExp as $ rule ) { $ this -> parseRule ( $ rule , $ input , $ key ) ; } } }
Validates the given input.

@param array  $input - Form input array
@param array  $rules - Validation rules
@param string $key   - Validation option

@return void
Validates the given input .