class_docstr: Validator for length.
class_docstr_tok: ["Validator","for","length","."]
docstr: Validate value.
docstr_tok: ["Validate","value","."]
code: def validate(self, value):
      """Validate value."""
      len_ = len(value)
  
      if self.minimum_value is not None and len_ < self.minimum_value:
          tpl = "Value '{val}' length is lower than allowed minimum '{min}'."
          raise ValidationError(
              tpl.format(val=value, min=self.minimum_value)
          )
  
      if self.maximum_value is not None and len_ > self.maximum_value:
          raise ValidationError(
              "Value '{val}' length is bigger than "
              "allowed maximum '{max}'.".format(
                  val=value,
                  max=self.maximum_value,
              )
          )
  
imports: import re
  from six.moves import reduce
  from .errors import ValidationError
  from .None import utilities
label_desc: Use image node_id 2 for calling the Length obj's underlying member method code with example usage: obj.validate(value) without return types