Answers for "if condition in laravel validation"

PHP
3

laravel exists validation

'state_id' => 'exists:states,id'
Posted by: Guest on January-18-2021
2

laravel required_if

$request->validate([
            'daily_movement_id'=>'required_with:daily_movement',
            'daily_movement'=>'required_with:daily_movement_id',
        ]);
//////////////////////////////////////////////////////
        $request->validate([
            'daily_movement_id'=>'required_without:daily_movement',
            'daily_movement'=>'required_without:daily_movement_id',
        ]);
Posted by: Guest on July-13-2021

Code answers related to "if condition in laravel validation"

Browse Popular Code Answers by Language