public function object($object, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('The first argument should be an object');
        }

        foreach ($rules as $property => $options) {
            $this->validateInput(
                $this->getPropertyValue($object, $property, $default),
                new Configuration($options, $property, $group, $default),
                $messages
            );
        }

        return $this;
    }
public function object($object, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('The first argument should be an object');
        }

        foreach ($rules as $property => $options) {
            $this->validateInput(
                $this->getPropertyValue($object, $property, $default),
                new Configuration($options, $property, $group, $default),
                $messages
            );
        }

        return $this;
    }
public function object ( $ object , array $ rules , string $ group = null , array $ messages = [ ] , $ default = null ) : self { if ( ! is_object ( $ object ) ) { throw new InvalidArgumentException ( 'The first argument should be an object' ) ; } foreach ( $ rules as $ property => $ options ) { $ this -> validateInput ( $ this -> getPropertyValue ( $ object , $ property , $ default ) , new Configuration ( $ options , $ property , $ group , $ default ) , $ messages ) ; } return $ this ; }
Validates an objects properties with the given rules.

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

@return self
Validates an objects properties with the given rules .