Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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"
]);
Comment

PREVIOUS NEXT
Code Example
Php :: break and continue in laravel 
Php :: set names utf8 
Php :: redirect woocommerce thank you 
Php :: scribe laravel 
Php :: bigtext migration laravel 
Php :: Pass all data to all pages laravel 
Php :: format date in php 
Php :: codeigniter 3 send email smtp 
Php :: wordpress translate specific text php 
Php :: remove all sessions in laravel 
Php :: The `url` supplied for the path (./nova) repository does not exist 
Php :: curl in laravel 
Php :: installing bootstrap on laravel8 
Php :: how see the list all artisan in laravel 
Php :: laravel db ssh 
Php :: php exec without waiting 
Php :: send html email laravel 
Php :: convert date to timestamp in laravel builder 
Php :: token delete laravel 
Php :: how to make doctrine schema update in symfony 2.8 
Php :: fetch data from live website curl php 
Php :: laravel eloquent select one column in array 
Php :: php clone datetime 
Php :: laravel make component 
Php :: php extract array 
Php :: pdo php search table 
Php :: remove first 4 characters in string php 
Php :: composer_update 
Php :: php Calculate the number of months between two dates 
Php :: spl_autoload_register 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =