def validate_max_length(self):
        if self.max_length != 0:
            if len(self._value) > self.max_length:
                raise ValueError('%s must be shorter than %i characters' % (self.__class__.__name__, self.max_length))
            else:
                return True
dataset/ETHPy150Open lonelycode/Mojo/Mojo/ObjectMapper/Fields.py/StringField.validate_max_length/original