src/Validators.php
public static function string($val, $minLen = 0, $maxLen = null): bool
    {
        if (!\is_string($val)) {
            return false;
        }

        // only type check.
        if ($minLen === 0 && $maxLen === null) {
            return true;
        }

        return self::integer(Helper::strlen($val), $minLen, $maxLen);
    }
public static function string($val, $minLen = 0, $maxLen = null): bool
    {
        if (!\is_string($val)) {
            return false;
        }

        // only type check.
        if ($minLen === 0 && $maxLen === null) {
            return true;
        }

        return self::integer(Helper::strlen($val), $minLen, $maxLen);
    }
public static function string ( $ val , $ minLen = 0 , $ maxLen = null ) : bool { if ( ! \ is_string ( $ val ) ) { return false ; } // only type check. if ( $ minLen === 0 && $ maxLen === null ) { return true ; } return self :: integer ( Helper :: strlen ( $ val ) , $ minLen , $ maxLen ) ; }
check val is a string
@param mixed    $val
@param int      $minLen
@param null|int $maxLen
@return bool
check val is a string