M
M
Mistikon2018-02-19 12:30:12
Laravel
Mistikon, 2018-02-19 12:30:12

How to validate a field depending on whether another field is filled in Laravel 5.5?

Some fields need to be checked for required only if other fields/field are filled, otherwise do not check.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
anlamas, 2018-02-19
@Mistikon

'middle_name' => required_with_all:name,last_name

M
Maxim Fedorov, 2018-02-19
@Maksclub

https://laravel.com/docs/5.6/validation#conditiona...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question