public function validate(array $data)
    {
        try {
            $messages = $this->validateArray($data, $this->nested);

        } catch (\RuntimeException $e) {
            throw (new ValidationException($e->getMessage(), $e->getCode(), $e))->setMessages();
        }

        if (!empty($messages)) {
            throw (new ValidationException())->setMessages($messages);
        }
    }
public function validate(array $data)
    {
        try {
            $messages = $this->validateArray($data, $this->nested);

        } catch (\RuntimeException $e) {
            throw (new ValidationException($e->getMessage(), $e->getCode(), $e))->setMessages();
        }

        if (!empty($messages)) {
            throw (new ValidationException())->setMessages($messages);
        }
    }
public function validate ( array $ data ) { try { $ messages = $ this -> validateArray ( $ data , $ this -> nested ) ; } catch ( \ RuntimeException $ e ) { throw ( new ValidationException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ) -> setMessages ( ) ; } if ( ! empty ( $ messages ) ) { throw ( new ValidationException ( ) ) -> setMessages ( $ messages ) ; } }
Validate data against blueprints.

@param  array $data
@throws \RuntimeException
Validate data against blueprints .