Answers for "except empty value validation laravel"

PHP
1

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"
]);
Posted by: Guest on September-22-2021
1

laravel return validation errors

@if($errors->any())
   @foreach ($errors->all() as $error)
      <div>{{ $error }}</div>
  @endforeach
@endif
Posted by: Guest on January-29-2021

Code answers related to "except empty value validation laravel"

Browse Popular Code Answers by Language