Retrieve the minimum number of characters allowed.

@return integer
970786
public function minLength()
    {
        if ($this->minLength === null) {
            $this->minLength = $this->defaultMinLength();
        }

        return $this->minLength;
    }
128222
protected function getLength($limit)
    {
        $size = strlen($this->data);
        if ($limit <= 0) {
            $limit += $size;
        }

        if ($limit > $size) {
            return null;
        }

        $res = (string) substr($this->data, 0, $limit);
        $this->data = (string) substr($this->data, $limit);
        return $res;
    }
697686
public function getLength()
    {
        return in_array($this->schema, $this->lengthSchemas, true) ? $this->precision : null;
    }
143034
public function toLowerCase() {
        $str = mb_strtolower($this->str, $this->encoding);

        return self::create($str, $this->encoding);
    }
393815
public function length($min, $max = PHP_INT_MAX)
    {
        return $this->markErrorIf(strlen($this->value) < $min || strlen($this->value) > $max);
    }
422127
public function getBarCharacter() {
        if (null === $this->barChar) {
            return $this->max ? '=' : $this->emptyBarChar;
        }

        return $this->barChar;
    }
977068
public function maxLength()
    {
        if ($this->maxLength === null) {
            $this->maxLength = $this->defaultMaxLength();
        }

        return $this->maxLength;
    }
1281563
public function validateMaxLength()
    {
        $val = $this->val();

        if ($val === null && $this->allowNull()) {
            return true;
        }

        $maxLength = $this->maxLength();
        if ($maxLength == 0) {
            return true;
        }

        if (is_string($val)) {
            $valid = (mb_strlen($val) <= $maxLength);
            if (!$valid) {
                $this->validator()->error('Maximum length error', 'maxLength');
            }
        } else {
            $valid = true;
            foreach ($val as $v) {
                $valid = (mb_strlen($v) <= $maxLength);
                if (!$valid) {
                    $this->validator()->error('Maximum length error', 'maxLength');
                    return $valid;
                }
            }
        }

        return $valid;
    }
235424
public function getQueryLimit()
    {
        if ($this->limit !== null && $this->offset !== null) {
            return 'LIMIT ' . $this->offset . ', ' . $this->limit;
        } else {
            if (null !== $this->limit) {
                return 'LIMIT ' . $this->limit;
            } else {
                return '';
            }
        }
    }
200275
protected function getMemoryLimit(): ?int
    {
        $short = [
            'k' => 1024,
            'm' => 1048576,
            'g' => 1073741824,
        ];

        $setting = (string) ini_get('memory_limit');

        if (!($len = strlen($setting))) {
            return null;
        }

        $last = strtolower($setting[$len - 1]);
        $numeric = (int) $setting;
        $numeric *= isset($short[$last]) ? $short[$last] : 1;

        return $numeric;
    }
903151
public function min()
    {
        if (!isset($this->meta['min'])) {
            $this->meta['min'] = (int) @min($this->get());
        }

        return $this->meta['min'];
    }
125386
public function validateMinLength()
    {
        $val = $this->val();

        if ($val === null) {
            return $this->allowNull();
        }

        $minLength = $this->minLength();
        if ($minLength == 0) {
            return true;
        }

        if ($val === '' && $this->allowEmpty()) {
            // Don't check empty string if they are allowed
            return true;
        }

        if (is_string($val)) {
            $valid = (mb_strlen($val) >= $minLength);
            if (!$valid) {
                $this->validator()->error('Minimum length error', 'minLength');
            }
        } else {
            $valid = true;
            foreach ($val as $v) {
                $valid = (mb_strlen($v) >= $minLength);
                if (!$valid) {
                    $this->validator()->error('Minimum length error', 'minLength');
                    return $valid;
                }
            }
        }

        return $valid;
    }
831338
public function getLength()
        {
        	if(!$this->_hasGetLen) {
        		$this->_hasGetLen = true;
		        $this->_length = $this->_redis->llen($this->_key);
	        }
                return $this->_length;
        }
722403
public function visitMinimumLengthConstraint(StringValue\MinimumLengthConstraint $constraint)
    {
        $value = $this->currentValue();
        if (
            !$value instanceof Value\StringValue ||
            mb_strlen($value->value(), 'UTF-8') >= $constraint->minimum()
        ) {
            return $this->createResult();
        }

        return $this->createSingleIssueResult($constraint);
    }
263042
private function validateLowerThan(): bool
    {
        if ($this->options['inclusive'] === true) {
            $isValid = \mb_strlen($this->value, 'UTF-8') <= $this->options['length'] ? true : false;
            if (!$isValid) {
                $this->setError(self::VALIDATOR_ERROR_STRING_LENGTH_MUST_BE_LOWER_OR_EQUAL_TO_MAX);
            }
            return $isValid;
        }

        $isValid = \mb_strlen($this->value, 'UTF-8') < $this->options['length'] ? true : false;
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_STRING_LENGTH_MUST_BE_LOWER_THAN_MAX);
        }
        return $isValid;
    }
452181
protected function min() {
    $this->a = "\n";
    $this->action(self::ACTION_DELETE_A_B);

    while ($this->a !== null) {
      switch ($this->a) {
        case ' ':
          if ($this->isAlphaNum($this->b)) {
            $this->action(self::ACTION_KEEP_A);
          } else {
            $this->action(self::ACTION_DELETE_A);
          }
          break;

        case "\n":
          switch ($this->b) {
            case '{':
            case '[':
            case '(':
            case '+':
            case '-':
              $this->action(self::ACTION_KEEP_A);
              break;

            case ' ':
              $this->action(self::ACTION_DELETE_A_B);
              break;

            default:
              if ($this->isAlphaNum($this->b)) {
                $this->action(self::ACTION_KEEP_A);
              }
              else {
                $this->action(self::ACTION_DELETE_A);
              }
          }
          break;

        default:
          switch ($this->b) {
            case ' ':
              if ($this->isAlphaNum($this->a)) {
                $this->action(self::ACTION_KEEP_A);
                break;
              }

              $this->action(self::ACTION_DELETE_A_B);
              break;

            case "\n":
              switch ($this->a) {
                case '}':
                case ']':
                case ')':
                case '+':
                case '-':
                case '"':
                case "'":
                  $this->action(self::ACTION_KEEP_A);
                  break;

                default:
                  if ($this->isAlphaNum($this->a)) {
                    $this->action(self::ACTION_KEEP_A);
                  }
                  else {
                    $this->action(self::ACTION_DELETE_A_B);
                  }
              }
              break;

            default:
              $this->action(self::ACTION_KEEP_A);
              break;
          }
      }
    }

    return $this->output;
  }
123854
public function length()
    {
        if ($this->isNull() || (is_string($this->value) && strlen($this->value) === 0)) {
            return 0;
        }

        if (is_string($this->value)) {
            return strlen($this->value);
        }

        return strlen(current($this->value));
    }