public function passes() { $validator = $this->validator->make($this->data, $this->rules, $this->messages); if ($validator->fails()) { $this->errors = $validator->messages(); return false; } return true; }
/** * Test if validation passes before update * * @author Steve Montambeault * @link http://stevemo.ca * * @return bool */ public function validForUpdate() { if (empty($this->data['password']) and empty($this->data['password_confirmation'])) { unset($this->rules['password']); unset($this->data['password']); } return parent::passes(); }