def validate(self, value, model=None, context=None):
length = len(str(value))<EOL>params = dict(min=self.min, max=self.max)<EOL>if self.min and self.max is None:<EOL><INDENT>if length < self.min:<EOL><INDENT>return Error(self.too_short, params)<EOL><DEDENT><DEDENT>if self.max and self.min is None:<EOL><INDENT>if length > self.max:<EOL><INDENT>return Error(self.too_long, params)<EOL><DEDENT><DEDENT>if self.min and self.max:<EOL><INDENT>if length < self.min or length > self.max:<EOL><INDENT>return Error(self.not_in_range, params)<EOL><DEDENT><DEDENT>return Error()<EOL>
Validate
Perform value validation against validation settings and return
simple result object

:param value:           str, value to check
:param model:           parent model being validated
:param context:         object or None, validation context
:return:                shiftschema.results.SimpleResult