pluck('domain')->contains(strtolower($emailDomain))) { return false; } $count = collect(config('anonaddy.all_domains')) ->filter(function ($domain) use ($emailDomain) { return Str::endsWith(strtolower($emailDomain), $domain); }) ->count(); return $count === 0; } /** * Get the validation error message. * * @return string */ public function message() { return 'The recipient cannot use a local domain or be an alias.'; } }