validate LARAVEL 8 code example
Example 1: validate laravel
$validatedData = $request->validate([
'title' => ['required', 'unique:posts', 'max:255'],
'body' => ['required'],
]);
Example 2: validate field for existing client laravel
unique:users,username,id,1 // table, field, idcolumn, value to ignore