Created
October 26, 2023 18:49
-
-
Save Tynael/248baa97e671e6c359dab73c869da507 to your computer and use it in GitHub Desktop.
Laravel — Improve Email Validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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|max:255', | |
'password' => 'required' | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example used in https://neutrondev.com/laravel-improve-email-validation/