public function hasError($field)
    {
        if (empty($this->_context['errors'])) {
            return false;
        }

        return (bool)Hash::check($this->_context['errors'], $field);
    }
public function hasError($field)
    {
        if (empty($this->_context['errors'])) {
            return false;
        }

        return (bool)Hash::check($this->_context['errors'], $field);
    }
public function hasError ( $ field ) { if ( empty ( $ this -> _context [ 'errors' ] ) ) { return false ; } return ( bool ) Hash :: check ( $ this -> _context [ 'errors' ] , $ field ) ; }
Check whether or not a field has an error attached to it

@param string $field A dot separated path to check errors on.
@return bool Returns true if the errors for the field are not empty.
Check whether or not a field has an error attached to it