def add_errors(self, property_name, errors):
if type(errors) is not list:<EOL><INDENT>errors = [errors]<EOL><DEDENT>for error in errors:<EOL><INDENT>if not isinstance(error, Error):<EOL><INDENT>err = '<STR_LIT>'<EOL>raise x.InvalidErrorType(err.format(Error))<EOL><DEDENT><DEDENT>if property_name in self.errors:<EOL><INDENT>self.errors[property_name].extend(errors)<EOL><DEDENT>else:<EOL><INDENT>self.errors[property_name] = errors<EOL><DEDENT>return self<EOL>
Add one or several errors to properties.
:param property_name: str, property name
:param errors: list or Error, error object(s)
:return: shiftschema.result.Result