Skip to content

Instantly share code, notes, and snippets.

@Tynael
Created October 26, 2023 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tynael/e8d1271304b0111b218f34280c23fcc7 to your computer and use it in GitHub Desktop.
Save Tynael/e8d1271304b0111b218f34280c23fcc7 to your computer and use it in GitHub Desktop.
Laravel — Improve Email Validation
<?php
declare(strict_types=1);
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateUserRequest extends FormRequest
{
public function rules(): array
{
return [
'name' => 'required|string|max:255',
'email' => 'required|email:rfc,dns|max:255',
'password' => 'required'
];
}
}
@Tynael
Copy link
Author

Tynael commented Oct 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment