Check input data

@param  mixed $input

@return bool
543796
public function validate($input): bool
    {
        if (!\is_array($input)) {
            return false;
        }
        $filtered = array_filter($input, $this->callback);
        return \count($input) === \count($filtered);
    }
308345
public function validate($input): bool
    {
        $this->error = null; // clean
        foreach ($this->rules as $rule) {
            if (!$rule->validate($input)) {
                // apply custom description or use description from rule
                $this->setError($this->description ?? $rule->getDescription());
                return false;
            }
        }
        return true;
    }
1222881
protected function validate(string $input): bool
    {
        return \Normalizer::isNormalized($input, \Normalizer::FORM_KC)
            && ($this->isRegExp($input) ? $this->validateRegexp($input) : $this->validateCharacters($input));
    }
29090
private function verifyMod10($input): bool
    {
        $sum = 0;
        $input = strrev($input);
        $inputLen = \strlen($input);
        for ($i = 0; $i < $inputLen; $i++) {
            $current = $input[$i];
            if ($i % 2 === 1) {
                $current *= 2;
                if ($current > 9) {
                    $firstDigit = $current % 10;
                    $secondDigit = ($current - $firstDigit) / 10;
                    $current = $firstDigit + $secondDigit;
                }
            }
            $sum += $current;
        }

        return ($sum % 10 === 0);
    }
728364
protected function isString($input)
    {
        return is_scalar($input) || is_null($input) || (is_object($input) && method_exists($input, '__toString'));
    }
241093
public function input($input) {
        if(isset($this->inputs->$input)) 
            return $this->inputs->$input;
        return null;
    }
331650
public function verifyHash($input)
    {
        $salt = substr($input, 0, strrpos($input, '$') + 1);
        $checksum = substr($input, strrpos($input, '$') + 1);

        return ($this->verifySalt($salt) && 1 === preg_match('/^[\.\/0-9A-Za-z]{28}$/', $checksum));
    }
1169527
public static function receive($input = null)
    {
        if (is_null($input)) {
            if (self::$receivedWebhook !== null) {
                $input = self::$receivedWebhook;
            } else {
                $input = file_get_contents("php://input");
            }
        }

        if (!is_null($input) && $input != '') {
            return self::processWebhook($input);
        }

        return false;
    }
358113
public function validate($input)
    {
        $checkDigit = explode(',', '0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,h,j,k,l,m,n,p,r,s,t,u,v,w,x,y');

        // Get the check digit
        $check = strtolower(substr($input, -1, 1));

        // Remove dash, plus or A
        if (strlen($input) == 11) {
            $input = substr($input, 0, 6) . substr($input, 7, 3);
        } else {
            $input = substr($input, 0, 9);
        }

        if (!preg_match('/^\d+$/', $input)) {
            return false;
        }

        // Do the math
        $result = $input % 31;

        return $checkDigit[$result] == $check;
    }
957189
private function parseValue($input)
    {
        if (is_array($input)) {

        } elseif (substr($input, 0, 1) === '"' && substr($input, -1) === '"') {
            $input = substr($input, 1, -1);
        } elseif (strpos($input, "|") !== false) {
            $input = explode("|", $input);
            foreach ($input as $key => $value) {
                $input[$key] = $this->parseValue($value);
            }
        } elseif ($input === "false") {
            $input = false;
        } elseif ($input === "true") {
            $input = true;
        } elseif (is_numeric($input)) {
            if (strpos($input, ".") !== false) {
                $input = (float)$input;
            } else {
                $input = (int)$input;
            }
        } elseif ($input === "on") {
            $input = true;
        }

        return $input;
    }
283466
public function verifySalt($input)
    {
        $regex = '/^\$' . $this->_identifier . '\$(?:rounds=(\d{4,9})\$)?([\.\/0-9A-Za-z]{0,16})\$?$/';
        $matches = array ();

        $appearsValid = (1 === preg_match($regex, $input, $matches));
        if ($appearsValid) {
            $rounds = (int) $matches[1];
            $salt = $matches[2];

            // If rounds parameter is in the salt position, the configuration
            // is probably not what the user intends. We could let it pass and
            // it'll "work", but we'll fail it for now.
            if (strpos($salt, 'rounds=') === 0) {
                $appearsValid = false;
            }

            if (!empty ($matches[1]) && ($rounds < 1000 || $rounds > 999999999)) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
1182730
public static function is( $input, bool $simple = false ): bool {
    if( is_int( $input ) || is_float( $input ) ) return true;
    else if( !$simple ) {

      if( is_bool( $input ) ) return true;
      else if( Text::is( $input, true ) ) return strlen( $input ) > 0 && ltrim( $input, '+-,.e0123456789' ) == '';
    }

    return false;
  }
38074
public function verifySalt($input)
    {
        $appearsValid = (1 === preg_match('/^\$2[axy]{1}\$\d{2}\$[\.\/0-9A-Za-z]{22}$/', $input));
        if ($appearsValid) {
            $costFactor = (int) substr($input, 4, 2);
            if ($costFactor < 4 || $costFactor > 31) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
835327
private function filterEmptyInput($input)
    {
        foreach ($input as $key => $value)
        {
            if (empty($value))
            {
                unset($input[$key]);
            }
        }

        return $input;
    }
1126986
public function validate($input): bool
    {
        return $this->less($this->minValue, $input)
            && $this->less($input, $this->maxValue);
    }
1284450
protected function cleanInputData(array $input)
    {
        $columns = $this->getColumns();
        foreach ($columns as $column) {
            if (!isset($input[$column])) {
                $input[$column] = '';
            }
        }
        return $input;
    }
179293
public function check(array $input)
    {
        $result = $this->spec->check($input);

        return new SpecResult(
            $result->getMissing(),
            Arr::walkCopy(
                $result->getFailed(),
                function ($key, $value, &$array, $path) {
                    $array[$key] = Std::coalesce(
                        Std::firstBias(
                            Arr::dotGet(
                                $this->messages,
                                Std::nonempty($path, $key)
                            ) !== null,
                            [Arr::dotGet(
                                $this->messages,
                                Std::nonempty($path, $key)
                            )],
                            null
                        ),
                        Std::firstBias(
                            $value instanceof AbstractConstraint,
                            function () use ($value) {
                                return $value->getDescription();
                            },
                            null
                        ),
                        Std::firstBias(
                            is_array($value),
                            function () use ($value) {
                                return array_map(
                                    function (AbstractConstraint $item) {
                                        return $item->getDescription();
                                    },
                                    $value
                                );
                            },
                            $value
                        )
                    );
                },
                true,
                '',
                false
            ),
            $result->getStatus()
        );
    }