public function array(array $array, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        foreach ($rules as $key => $options) {
            $this->validateInput(
                $array[$key] ?? $default,
                new Configuration($options, $key, $group, $default),
                $messages
            );
        }

        return $this;
    }
public function array(array $array, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        foreach ($rules as $key => $options) {
            $this->validateInput(
                $array[$key] ?? $default,
                new Configuration($options, $key, $group, $default),
                $messages
            );
        }

        return $this;
    }
public function array ( array $ array , array $ rules , string $ group = null , array $ messages = [ ] , $ default = null ) : self { foreach ( $ rules as $ key => $ options ) { $ this -> validateInput ( $ array [ $ key ] ?? $ default , new Configuration ( $ options , $ key , $ group , $ default ) , $ messages ) ; } return $ this ; }
Validates an array with the given rules.

@param array         $array
@param AllOf[]|array $rules
@param string|null   $group
@param string[]      $messages
@param mixed|null    $default

@return self
Validates an array with the given rules .