public function hasError($key, $group = null)
    {
        return !empty($this->validator->getErrors($key, $group));
    }
public function hasError($key, $group = null)
    {
        return !empty($this->validator->getErrors($key, $group));
    }
public function hasError ( $ key , $ group = null ) { return ! empty ( $ this -> validator -> getErrors ( $ key , $ group ) ) ; }
Tells whether there are validation errors for a parameter.

@param string $key
@param string $group

@return bool
Tells whether there are validation errors for a parameter .