src/RulesCollection.php
private function getErrors(string $key, array $scope, array $input): array
    {
        $errors = [];

        foreach ($this->rules as $rule) {

            try {

                $rule->validate($key, $scope, $input);

            }

            catch (ValidationException $e) {

                $parameters = $e->getParameters();

                $errors[] = new ValidationError($rule->getName(), $parameters);

            }

        }

        return $errors;
    }
private function getErrors(string $key, array $scope, array $input): array
    {
        $errors = [];

        foreach ($this->rules as $rule) {

            try {

                $rule->validate($key, $scope, $input);

            }

            catch (ValidationException $e) {

                $parameters = $e->getParameters();

                $errors[] = new ValidationError($rule->getName(), $parameters);

            }

        }

        return $errors;
    }
private function getErrors ( string $ key , array $ scope , array $ input ) : array { $ errors = [ ] ; foreach ( $ this -> rules as $ rule ) { try { $ rule -> validate ( $ key , $ scope , $ input ) ; } catch ( ValidationException $ e ) { $ parameters = $ e -> getParameters ( ) ; $ errors [ ] = new ValidationError ( $ rule -> getName ( ) , $ parameters ) ; } } return $ errors ; }
Run the validation on a key of the given scope.

@param string    $key
@param array     $scope
@param array     $input
@return array
Run the validation on a key of the given scope .