public function validateData(array $data, array $rules, array $messages)
    {
        if ($rules) {
            $this->customValidator->setData($data);
            $this->customValidator->setRules($rules);
            $this->customValidator->setCustomMessages($messages);

            //if the validator fails, kick back the errors
            if ($this->customValidator->fails()) {
                return implode('. ', $this->customValidator->messages()->all());
            }
        }

        return true;
    }
public function validateData(array $data, array $rules, array $messages)
    {
        if ($rules) {
            $this->customValidator->setData($data);
            $this->customValidator->setRules($rules);
            $this->customValidator->setCustomMessages($messages);

            //if the validator fails, kick back the errors
            if ($this->customValidator->fails()) {
                return implode('. ', $this->customValidator->messages()->all());
            }
        }

        return true;
    }
public function validateData ( array $ data , array $ rules , array $ messages ) { if ( $ rules ) { $ this -> customValidator -> setData ( $ data ) ; $ this -> customValidator -> setRules ( $ rules ) ; $ this -> customValidator -> setCustomMessages ( $ messages ) ; //if the validator fails, kick back the errors if ( $ this -> customValidator -> fails ( ) ) { return implode ( '. ' , $ this -> customValidator -> messages ( ) -> all ( ) ) ; } } return true ; }
Validates the supplied data against the options rules.

@param array $data
@param array $rules
@param array $messages
@param mixed
Validates the supplied data against the options rules .