def validate(self, columns=None):
schema = self.schema()<EOL>if not columns:<EOL><INDENT>ignore_flags = orb.Column.Flags.Virtual | orb.Column.Flags.ReadOnly<EOL>columns = schema.columns(flags=~ignore_flags).values()<EOL>use_indexes = True<EOL><DEDENT>else:<EOL><INDENT>use_indexes = False<EOL><DEDENT>values = self.values(key='<STR_LIT>', columns=columns)<EOL>for col, value in values.items():<EOL><INDENT>if not col.validate(value):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>if use_indexes:<EOL><INDENT>for index in self.schema().indexes().values():<EOL><INDENT>if not index.validate(self, values):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Validates the current record object to make sure it is ok to commit to the database.  If
the optional override dictionary is passed in, then it will use the given values vs. the one
stored with this record object which can be useful to check to see if the record will be valid before
it is committed.

:param      overrides | <dict>

:return     <bool>