public function getError($field) {
        if(array_key_exists($field, $this->errors)) {
            return $this->errors[$field];
        }
        return null;
    }
public function getError($field) {
        if(array_key_exists($field, $this->errors)) {
            return $this->errors[$field];
        }
        return null;
    }
public function getError ( $ field ) { if ( array_key_exists ( $ field , $ this -> errors ) ) { return $ this -> errors [ $ field ] ; } return null ; }
return error message for a field
@param string $field
@return array
return error message for a field