“Laravel wajib_if” Kode Jawaban

Validasi email di Laravel

'email' => 'required|email|unique:users,email',
//@sujay
$uj@y

Laravel diperlukan jika

"sale_price" => "required_if:list_type,==,selling"
Foolish Ferret

Laravel wajib_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',
        ]);
Mohamad

diperlukan_if Laravel

public function rules()
 {
    return [
      'reclamo_procede'  => 'max:1',             
      'solucion_minutos' => 'required_if:reclamo_procede,==,si', 
    ];
 }
Junior Cercado Vasquez

Validasi email di Laravel

 $validator = Validator::make($request->all(), []);

 $validator->sometimes('email', 'unique:users,email', function ($input) {
            return $input->email !== Auth::user()->email;
        });
//@sujay
$uj@y

Jawaban yang mirip dengan “Laravel wajib_if”

Pertanyaan yang mirip dengan “Laravel wajib_if”

Lebih banyak jawaban terkait untuk “Laravel wajib_if” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya