Answers for "add validation in create in laravel"

PHP
3

email validation in laravel

'email' => 'required|email|unique:users,email',
//@sujay
Posted by: Guest on October-09-2020
0

laravel validation

use Illuminate\Validation\Rule;

Validator::make($data, [
    'email' => [
        'required',
        Rule::unique('users')->ignore($user->id),
    ],
]);
Posted by: Guest on December-25-2020

Code answers related to "add validation in create in laravel"

Browse Popular Code Answers by Language