protected function validate($data, $rules)
    {
        $data = array_filter($data);

        $validator = $this->validator->make($data, $rules);

        if ($validator->fails()) {
            throw new PagSeguroException($validator->messages()->first(), 1003);
        }
    }
protected function validate($data, $rules)
    {
        $data = array_filter($data);

        $validator = $this->validator->make($data, $rules);

        if ($validator->fails()) {
            throw new PagSeguroException($validator->messages()->first(), 1003);
        }
    }
protected function validate ( $ data , $ rules ) { $ data = array_filter ( $ data ) ; $ validator = $ this -> validator -> make ( $ data , $ rules ) ; if ( $ validator -> fails ( ) ) { throw new PagSeguroException ( $ validator -> messages ( ) -> first ( ) , 1003 ) ; } }
Valida os dados.

@param array $data
@param array $rules

@throws \Artistas\PagSeguro\PagSeguroException
Valida os dados .