userService = resolve('microUserService'); } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { return $this->userService->getByEmail($value) == null; } /** * Get the validation error message. * * @return string */ public function message() { return '该邮箱已经被注册,请使用其它邮箱'; } }