public function roleDependencyValidation($attribute) { if ($this->role && $this->role->requires_comment && !trim($this->role_comments)) { $this->addError($attribute, 'Role requires a comment'); } }