Overtrue\Validation\Validator::validateDigitsBetween PHP Method

validateDigitsBetween() protected method

Validate that an attribute is between a given number of digits.
protected validateDigitsBetween ( string $attribute, mixed $value, array $parameters ) : boolean
$attribute string
$value mixed
$parameters array
return boolean
    protected function validateDigitsBetween($attribute, $value, $parameters)
    {
        $this->requireParameterCount(2, $parameters, 'digits_between');
        $length = strlen((string) $value);
        return $length >= $parameters[0] && $length <= $parameters[1];
    }
Validator