Validator.php
public function validate(array $data = null)
    {
        $data = $data ?: $this->getInput();

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

        if ($this->validation->fails())
        {
            $this->failed();

            return false;
        }

        return true;
    }
public function validate(array $data = null)
    {
        $data = $data ?: $this->getInput();

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

        if ($this->validation->fails())
        {
            $this->failed();

            return false;
        }

        return true;
    }
public function validate ( array $ data = null ) { $ data = $ data ? : $ this -> getInput ( ) ; $ this -> validation = $ this -> validator -> make ( $ data , $ this -> rules ( ) , $ this -> messages ( ) ) ; if ( $ this -> validation -> fails ( ) ) { $ this -> failed ( ) ; return false ; } return true ; }
Validate the given data.

@param array $data
@return bool
@throws ValidationException
Validate the given data .