Populate field errors with errors from schema validation

def set_errors(self, result):
        """ Populate field errors with errors from schema validation """

        # todo: use wtf locale
        errors = result.get_messages()

        for property_name in errors:
            if not hasattr(self, property_name):
                continue # ignore errors for missing fields

            prop_errors = errors[property_name]
            if type(prop_errors) is not list:
                prop_errors = ['<Nested schema result following...>']
            if property_name in self.errors:
                self.errors[property_name].extend(prop_errors)
            else:
                self.errors[property_name] = prop_errors