field not required validation laravel
$this->validate($request, [
"field_nullable" => "nullable"
]
field not required validation laravel
$this->validate($request, [
"field_nullable" => "nullable"
]
laravel 8 validation required if another field is not null
$request->validate([
"old_password" =>"nullable",
"new_password" =>"confirmed|nullable|different:old_password|required_with:old_password",
"password_confirmation" =>"nullable|required_with:new_password|required_with:old_password"
]);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us