def validate_access_permission(self, valid_permissions):
self.check_connection()<EOL>if typepy.is_null_string(self.mode):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if self.mode not in valid_permissions:<EOL><INDENT>raise IOError(<EOL>"<STR_LIT>".format(<EOL>"<STR_LIT>".join(valid_permissions), self.mode<EOL>)<EOL>)<EOL><DEDENT>
:param valid_permissions:
    List of permissions that access is allowed.
:type valid_permissions: |list|/|tuple|
:raises ValueError: If the |attr_mode| is invalid.
:raises IOError:
    If the |attr_mode| not in the ``valid_permissions``.
:raises simplesqlite.NullDatabaseConnectionError:
    |raises_check_connection|