What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-13 11:33:13
username or email validation in laravel
$input = $request->only('account'); // dont use all(), ever $rules = [ 'account' => 'required' ]; if (filter_var($input['account'], FILTER_VALIDATE_EMAIL)) { $rules['account'] .= '|exists:users,email'; } else { $rules['account... Add solution
Best helpers
Ranking is empty